mgcsoftimage.h

来自「《3D游戏引擎设计》的源码」· C头文件 代码 · 共 49 行

H
49
字号
// Magic Software, Inc.
// http://www.magic-software.com
// Copyright (c) 2000, All Rights Reserved
//
// Source code from Magic Software is supplied under the terms of a license
// agreement and may not be copied or disclosed except in accordance with the
// terms of that agreement.  The various license agreements may be found at
// the Magic Software web site.  This file is subject to the license
//
// RESTRICTED USE SOURCE CODE
// http://www.magic-software.com/License/restricted.pdf

#ifndef MGCSOFTIMAGE_H
#define MGCSOFTIMAGE_H

#include "MgcSoftColor.h"


class MgcSoftImage
{
public:
    MgcSoftImage ();

    void Set (int iXSize, int iYSize, MgcSoftColor* akColor, bool bXClamp,
        bool bYClamp);

    int GetXSize () const;
    int GetYSize () const;
    const MgcSoftColor* GetColors () const;

    int GetX (MgcReal fX) const;
    int GetY (MgcReal fY) const;

    MgcSoftColor GetColor (int iX, int iY);
    MgcSoftColor GetColor (MgcReal fX, MgcReal fY);

protected:
    int m_iXSize, m_iYSize;
    int m_iXSizeM1, m_iYSizeM1;
    int m_iLogXSize, m_iLogYSize;
    MgcReal m_fXSizeM1, m_fYSizeM1;
    bool m_bXClamp, m_bYClamp;
    MgcSoftColor* m_akColor;
};

#include "MgcSoftImage.inl"

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?