• D3DXVECTOR3


    http://technet.microsoft.com/zh-cn/bb205546

    Describes a three-component vector including operator overloads and type casts.

    Syntax

    typedef struct D3DXVECTOR3 {
      FLOAT x;
      FLOAT y;
      FLOAT z;
    } D3DXVECTOR3, *LPD3DXVECTOR3;

    Members

    x

    Type: FLOAT

    The x-component.

    y

    Type: FLOAT

    The y-component.

    z

    Type: FLOAT

    The z-component.

    Remarks

    D3DXVECTOR3 Extensions

    D3DXVECTOR3 has the following C++ extensions.

    1. #ifdef __cplusplus
    2. typedef struct D3DXVECTOR3 : public D3DVECTOR
    3. {
    4. public:
    5.     D3DXVECTOR3() {};
    6.     D3DXVECTOR3( CONST FLOAT * );
    7.     D3DXVECTOR3( CONST D3DVECTOR& );
    8.     D3DXVECTOR3( CONST D3DXFLOAT16 * );
    9.     D3DXVECTOR3( FLOAT x, FLOAT y, FLOAT z );
    10.  
    11.     // casting
    12.     operator FLOAT* ();
    13.     operator CONST FLOAT* () const;
    14.  
    15.     // assignment operators
    16.     D3DXVECTOR3& operator += ( CONST D3DXVECTOR3& );
    17.     D3DXVECTOR3& operator -= ( CONST D3DXVECTOR3& );
    18.     D3DXVECTOR3& operator *= ( FLOAT );
    19.     D3DXVECTOR3& operator /= ( FLOAT );
    20.  
    21.     // unary operators
    22.     D3DXVECTOR3 operator + () const;
    23.     D3DXVECTOR3 operator - () const;
    24.  
    25.     // binary operators
    26.     D3DXVECTOR3 operator + ( CONST D3DXVECTOR3& ) const;
    27.     D3DXVECTOR3 operator - ( CONST D3DXVECTOR3& ) const;
    28.     D3DXVECTOR3 operator * ( FLOAT ) const;
    29.     D3DXVECTOR3 operator / ( FLOAT ) const;
    30.  
    31.     friend D3DXVECTOR3 operator * ( FLOAT, CONST struct D3DXVECTOR3& );
    32.  
    33.     BOOL operator == ( CONST D3DXVECTOR3& ) const;
    34.     BOOL operator != ( CONST D3DXVECTOR3& ) const;
    35.  
    36. } D3DXVECTOR3, *LPD3DXVECTOR3;
    37.  
    38. #else //!__cplusplus
    39. typedef struct _D3DVECTOR D3DXVECTOR3, *LPD3DXVECTOR3;
    40. #endif //!__cplusplus
    41.  
    42. typedef struct D3DXVECTOR3_16F
    43. {
    44. #ifdef __cplusplus
    45. public:
    46.     D3DXVECTOR3_16F() {};
    47.     D3DXVECTOR3_16F( CONST FLOAT * );
    48.     D3DXVECTOR3_16F( CONST D3DVECTOR& );
    49.     D3DXVECTOR3_16F( CONST D3DXFLOAT16 * );
    50.     D3DXVECTOR3_16F( CONST D3DXFLOAT16 &x, CONST D3DXFLOAT16 &y, CONST D3DXFLOAT16 &z );
    51.  
    52.     // casting
    53.     operator D3DXFLOAT16* ();
    54.     operator CONST D3DXFLOAT16* () const;
    55.  
    56.     // binary operators
    57.     BOOL operator == ( CONST D3DXVECTOR3_16F& ) const;
    58.     BOOL operator != ( CONST D3DXVECTOR3_16F& ) const;
    59.  
    60. public:
    61. #endif //__cplusplus
    62.     D3DXFLOAT16 x, y, z;
    63.  
    64. } D3DXVECTOR3_16F, *LPD3DXVECTOR3_16F;
  • 相关阅读:
    一次访问ORACLE数据字典的优化
    利用分区优化SQL
    转行程序员的故事
    有一个苹果
    ubuntu10.04启动后出现grub rescue 模式
    source 命令 && . 命令
    ubuntu10.04启动后出现grub rescue 模式
    Android 各国语言缩写各国语言简称 .
    cpu的核心数、线程数、处理器的位数、操作系统的位数、能够支持最大内存 小结
    产品生产的各个阶段:DV,EV,PV ········是什么意思
  • 原文地址:https://www.cnblogs.com/dragon2012/p/2940202.html
Copyright © 2020-2023  润新知