亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? matrix.h

?? 浙江大學的悟空嵌入式系統模擬器
?? H
字號:
/////////////////////////////////////////////////////////////////////////////
// Name:        matrix.h
// Purpose:     wxTransformMatrix class. NOT YET USED
//! Author:      Chris Breeze, Julian Smart
// Modified by:  Klaas Holwerda
// Created:     01/02/97
// RCS-ID:      $Id: matrix.h,v 1.1 2005/03/16 06:49:18 kehc Exp $
// Copyright:   (c) Julian Smart and Markus Holzem
// Licence:     wxWindows licence
/////////////////////////////////////////////////////////////////////////////

#ifndef _WX_MATRIXH__
#define _WX_MATRIXH__

#if defined(__GNUG__) && !defined(__APPLE__)
#pragma interface "matrix.h"
#endif

//! headerfiles="matrix.h wx/object.h"
#include "wx/object.h"

//! codefiles="matrix.cpp"

// A simple 3x3 matrix. This may be replaced by a more general matrix
// class some day.
//
// Note: this is intended to be used in wxDC at some point to replace
// the current system of scaling/translation. It is not yet used.

//:defenition
//  A 3x3 matrix to do 2D transformations.
//  It can be used to map data to window coordinates.
//  But also for manipulating your own data.
//  For example drawing a picture (composed of several primitives)
//  at a certain coordinate and angle within another parent picture.
//  At all times m_isIdentity is set if the matrix itself is an Identity matrix.
//  It is used where possible to optimize calculations.
class WXDLLEXPORT wxTransformMatrix: public wxObject
{
public:
    wxTransformMatrix(void);
    wxTransformMatrix(const wxTransformMatrix& mat);

    //get the value in the matrix at col,row
    //rows are horizontal (second index of m_matrix member)
    //columns are vertical (first index of m_matrix member)
    double GetValue(int col, int row) const;

    //set the value in the matrix at col,row
    //rows are horizontal (second index of m_matrix member)
    //columns are vertical (first index of m_matrix member)
    void SetValue(int col, int row, double value);

    void operator = (const wxTransformMatrix& mat);
    bool operator == (const wxTransformMatrix& mat);
    bool operator != (const wxTransformMatrix& mat);

    //multiply every element by t
    wxTransformMatrix&          operator*=(const double& t);
    //divide every element by t
    wxTransformMatrix&          operator/=(const double& t);
    //add matrix m to this t
    wxTransformMatrix&          operator+=(const wxTransformMatrix& m);
    //subtract matrix m from this
    wxTransformMatrix&          operator-=(const wxTransformMatrix& m);
    //multiply matrix m with this
    wxTransformMatrix&          operator*=(const wxTransformMatrix& m);

    // constant operators

    //multiply every element by t  and return result
    wxTransformMatrix           operator*(const double& t) const;
    //divide this matrix by t and return result
    wxTransformMatrix           operator/(const double& t) const;
    //add matrix m to this and return result
    wxTransformMatrix           operator+(const wxTransformMatrix& m) const;
    //subtract matrix m from this and return result
    wxTransformMatrix           operator-(const wxTransformMatrix& m) const;
    //multiply this by matrix m and return result
    wxTransformMatrix           operator*(const wxTransformMatrix& m) const;
    wxTransformMatrix           operator-() const;

    //rows are horizontal (second index of m_matrix member)
    //columns are vertical (first index of m_matrix member)
    double& operator()(int col, int row);

    //rows are horizontal (second index of m_matrix member)
    //columns are vertical (first index of m_matrix member)
    double operator()(int col, int row) const;

    // Invert matrix
    bool Invert(void);

    // Make into identity matrix
    bool Identity(void);

    // Is the matrix the identity matrix?
    // Only returns a flag, which is set whenever an operation
    // is done.
    inline bool IsIdentity(void) const { return m_isIdentity; };

    // This does an actual check.
    inline bool IsIdentity1(void) const ;

    //Scale by scale (isotropic scaling i.e. the same in x and y):
    //!ex:
    //!code:           | scale  0      0      |
    //!code: matrix' = |  0     scale  0      | x matrix
    //!code:           |  0     0      scale  |
    bool Scale(double scale);

    //Scale with center point and x/y scale
    //
    //!ex:
    //!code:           |  xs    0      xc(1-xs) |
    //!code: matrix' = |  0    ys      yc(1-ys) | x matrix
    //!code:           |  0     0      1        |
    wxTransformMatrix&  Scale(const double &xs, const double &ys,const double &xc, const double &yc);

    // mirror a matrix in x, y
    //!ex:
    //!code:           | -1     0      0 |
    //!code: matrix' = |  0    -1      0 | x matrix
    //!code:           |  0     0      1 |
    wxTransformMatrix&  Mirror(bool x=TRUE, bool y=FALSE);
    // Translate by dx, dy:
    //!ex:
    //!code:           | 1  0 dx |
    //!code: matrix' = | 0  1 dy | x matrix
    //!code:           | 0  0  1 |
    bool Translate(double x, double y);

    // Rotate clockwise by the given number of degrees:
    //!ex:
    //!code:           |  cos sin 0 |
    //!code: matrix' = | -sin cos 0 | x matrix
    //!code:           |   0   0  1 |
    bool Rotate(double angle);

    //Rotate counter clockwise with point of rotation
    //
    //!ex:
    //!code:           |  cos(r) -sin(r)    x(1-cos(r))+y(sin(r)|
    //!code: matrix' = |  sin(r)  cos(r)    y(1-cos(r))-x(sin(r)| x matrix
    //!code:           |   0          0                       1 |
    wxTransformMatrix&  Rotate(const double &r, const double &x, const double &y);

    // Transform X value from logical to device
    inline double TransformX(double x) const;

    // Transform Y value from logical to device
    inline double TransformY(double y) const;

    // Transform a point from logical to device coordinates
    bool TransformPoint(double x, double y, double& tx, double& ty) const;

    // Transform a point from device to logical coordinates.
    // Example of use:
    //   wxTransformMatrix mat = dc.GetTransformation();
    //   mat.Invert();
    //   mat.InverseTransformPoint(x, y, x1, y1);
    // OR (shorthand:)
    //   dc.LogicalToDevice(x, y, x1, y1);
    // The latter is slightly less efficient if we're doing several
    // conversions, since the matrix is inverted several times.
    // N.B. 'this' matrix is the inverse at this point
    bool InverseTransformPoint(double x, double y, double& tx, double& ty) const;

    double Get_scaleX();
    double Get_scaleY();
    double GetRotation();
    void   SetRotation(double rotation);


public:
    double  m_matrix[3][3];
    bool    m_isIdentity;
};


/*
Chris Breeze reported, that
some functions of wxTransformMatrix cannot work because it is not
known if he matrix has been inverted. Be careful when using it.
*/

// Transform X value from logical to device
// warning: this function can only be used for this purpose
// because no rotation is involved when mapping logical to device coordinates
// mirror and scaling for x and y will be part of the matrix
// if you have a matrix that is rotated, eg a shape containing a matrix to place
// it in the logical coordinate system, use TransformPoint
inline double wxTransformMatrix::TransformX(double x) const
{
    //normally like this, but since no rotation is involved (only mirror and scale)
    //we can do without Y -> m_matrix[1]{0] is -sin(rotation angle) and therefore zero
    //(x * m_matrix[0][0] + y * m_matrix[1][0] + m_matrix[2][0]))
    return (m_isIdentity ? x : (x * m_matrix[0][0] +  m_matrix[2][0]));
}

// Transform Y value from logical to device
// warning: this function can only be used for this purpose
// because no rotation is involved when mapping logical to device coordinates
// mirror and scaling for x and y will be part of the matrix
// if you have a matrix that is rotated, eg a shape containing a matrix to place
// it in the logical coordinate system, use TransformPoint
inline double wxTransformMatrix::TransformY(double y) const
{
    //normally like this, but since no rotation is involved (only mirror and scale)
    //we can do without X -> m_matrix[0]{1] is sin(rotation angle) and therefore zero
    //(x * m_matrix[0][1] + y * m_matrix[1][1] + m_matrix[2][1]))
    return (m_isIdentity ? y : (y * m_matrix[1][1] + m_matrix[2][1]));
}


// Is the matrix the identity matrix?
// Each operation checks whether the result is still the identity matrix and sets a flag.
inline bool wxTransformMatrix::IsIdentity1(void) const
{
    return
     (m_matrix[0][0] == 1.0 &&
      m_matrix[1][1] == 1.0 &&
      m_matrix[2][2] == 1.0 &&
      m_matrix[1][0] == 0.0 &&
      m_matrix[2][0] == 0.0 &&
      m_matrix[0][1] == 0.0 &&
      m_matrix[2][1] == 0.0 &&
      m_matrix[0][2] == 0.0 &&
      m_matrix[1][2] == 0.0) ;
}

// Calculates the determinant of a 2 x 2 matrix
inline double wxCalculateDet(double a11, double a21, double a12, double a22)
{
    return a11 * a22 - a12 * a21;
}

#endif
    // _WX_MATRIXH__

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二区在线免费播放| 亚洲高清不卡在线| 国产一区二区三区在线观看免费视频 | 亚洲激情男女视频| av在线不卡网| 一区二区三区中文免费| 欧美日韩亚洲丝袜制服| 日本女优在线视频一区二区| 日韩午夜在线影院| 国产精品一区专区| 亚洲欧美日韩小说| 欧美精品久久天天躁| 激情综合网av| 1区2区3区欧美| 欧美高清一级片在线| 国产精品一区二区在线观看不卡 | 久久久久久久久岛国免费| 国产91精品一区二区| 亚洲情趣在线观看| 欧美性猛片aaaaaaa做受| 久久se精品一区精品二区| 国产日韩欧美不卡在线| 91无套直看片红桃| 日韩vs国产vs欧美| 欧美激情一区二区三区四区| 91福利社在线观看| 国内精品自线一区二区三区视频| 国产精品久线观看视频| 欧美三级乱人伦电影| 国产成人综合网站| 丝袜脚交一区二区| 国产精品三级电影| 欧美一区二区三区精品| caoporn国产精品| 日韩av一二三| 亚洲精品成人在线| 久久影院午夜片一区| 国产人成亚洲第一网站在线播放| 91福利视频网站| 国产99一区视频免费| 日韩成人一级大片| 亚洲精品视频在线观看免费| 精品久久久久久久久久久久久久久 | 欧美亚洲禁片免费| 成人在线综合网站| 日本中文在线一区| 一区二区成人在线| 国产精品每日更新在线播放网址| 日韩视频一区二区| 欧美视频在线观看一区二区| 成人黄色av电影| 国精产品一区一区三区mba视频| 亚洲图片欧美综合| 国产精品久久久一本精品| 日韩欧美国产综合一区| 欧美色综合天天久久综合精品| 国产91丝袜在线观看| 精一区二区三区| 日本在线播放一区二区三区| 亚洲综合色噜噜狠狠| 最新高清无码专区| 中文字幕精品综合| 2024国产精品视频| 精品第一国产综合精品aⅴ| 欧美久久一二区| 欧美日韩亚洲综合在线| 欧美综合在线视频| 色婷婷精品久久二区二区蜜臀av| 国产99久久久久久免费看农村| 精品影视av免费| 日韩高清中文字幕一区| 午夜精品福利久久久| 一区二区三区久久久| 亚洲精品一卡二卡| 亚洲色图一区二区| 亚洲少妇30p| 一区二区三区小说| 洋洋成人永久网站入口| 一区二区三区波多野结衣在线观看 | 国产精品二区一区二区aⅴ污介绍| 久久在线观看免费| 国产农村妇女毛片精品久久麻豆| 久久嫩草精品久久久精品| xvideos.蜜桃一区二区| 国产日韩一级二级三级| 国产精品美女久久久久久久久久久| 国产欧美va欧美不卡在线| 中文字幕精品—区二区四季| 国产精品美女久久久久久久| 亚洲日穴在线视频| 亚洲综合激情另类小说区| 亚洲国产一二三| www.性欧美| 色哟哟在线观看一区二区三区| 一本到一区二区三区| 色哦色哦哦色天天综合| 欧美日韩国产小视频在线观看| 91精品国产综合久久国产大片| 日韩三级中文字幕| 久久久国际精品| 一区二区三区中文免费| 青青草97国产精品免费观看无弹窗版| 奇米精品一区二区三区在线观看一| 精品一区二区三区在线观看国产| 国产美女视频一区| 色婷婷综合中文久久一本| 在线成人免费观看| 久久精品人人做人人爽97| 国产精品国产精品国产专区不蜜 | 欧美色国产精品| 日韩视频免费直播| 国产精品美女久久久久高潮 | 亚洲国产精品精华液网站| 热久久久久久久| 国产不卡视频一区| 欧美自拍偷拍一区| 久久综合九色综合欧美98 | 精品蜜桃在线看| 国产精品高潮久久久久无| 亚洲国产视频在线| 国产精品自拍av| 在线精品国精品国产尤物884a| 日韩欧美的一区二区| 1区2区3区欧美| 极品少妇xxxx精品少妇| 日本韩国一区二区三区| 亚洲精品一区二区三区香蕉| 亚洲精品中文在线观看| 国产精品原创巨作av| 欧美肥大bbwbbw高潮| 综合久久久久综合| 精久久久久久久久久久| 欧美体内she精高潮| 国产日韩精品一区二区三区| 日韩电影一区二区三区四区| 91影视在线播放| 久久免费电影网| 日韩国产欧美视频| 色偷偷88欧美精品久久久| 久久美女艺术照精彩视频福利播放| 亚洲午夜三级在线| av电影在线观看不卡| 久久伊人中文字幕| 喷白浆一区二区| 欧美亚洲图片小说| 亚洲裸体xxx| 不卡的av在线播放| 精品免费国产二区三区| 日本美女一区二区三区视频| 在线这里只有精品| 亚洲天堂2016| 91一区二区在线| 国产精品欧美一区二区三区| 另类综合日韩欧美亚洲| 制服丝袜亚洲播放| 亚洲午夜视频在线| 亚洲婷婷国产精品电影人久久| 国产一区二区伦理| 337p粉嫩大胆噜噜噜噜噜91av| 午夜精品福利一区二区蜜股av| 91久久精品国产91性色tv| 国产精品进线69影院| 成人黄色在线视频| 国产精品无码永久免费888| 国产精品资源站在线| 精品99一区二区三区| 激情都市一区二区| 久久婷婷成人综合色| 国产一区二区三区国产| 久久久国产一区二区三区四区小说| 看片网站欧美日韩| 精品蜜桃在线看| 国产成人免费网站| 中文成人av在线| www.66久久| 亚洲一区二区视频在线| 欧美亚洲国产怡红院影院| 亚洲成av人片| 欧美一级日韩不卡播放免费| 久久超碰97中文字幕| 日韩欧美国产精品| 国产精选一区二区三区| 欧美激情一区二区三区不卡 | 91久久香蕉国产日韩欧美9色| 亚洲视频免费在线观看| 欧美在线一区二区三区| 天堂资源在线中文精品| 日韩手机在线导航| 国产成人亚洲综合a∨婷婷| 国产精品高潮呻吟| 欧美猛男男办公室激情| 麻豆一区二区在线| 国产日韩av一区| 在线影院国内精品| 美女www一区二区| 欧美国产视频在线| 欧美日韩精品电影| 国产精品77777| 亚洲一区视频在线观看视频| 日韩精品专区在线|