zoukankan      html  css  js  c++  java
  • 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;
  • 相关阅读:
    JS设计模式(11)中介者模式
    PHP实现微信模板消息发送给指定用户
    PHP浮点精度问题
    PHP微信红包生成算法的程序源码(用抛物线的模型实现)
    PHP队列的实现详细操作步骤
    PHP数组函数实现栈与队列的方法介绍(代码示例)
    Laravel 事务中使用悲观锁
    array_reduce — 用回调函数迭代地将数组简化为单一的值
    PHP上传文件和下载
    php导出xls,报错:文件格式和扩展名不匹配。该文件可能已损坏或不安全。除非你相信它的来源,否则不要打开它。
  • 原文地址:https://www.cnblogs.com/dragon2012/p/2940202.html
Copyright © 2011-2022 走看看