VirtualBox

source: vbox/trunk/src/VBox/GuestHost/OpenGL/util/warp.c@ 76384

最後變更 在這個檔案從76384是 53726,由 vboxsync 提交於 10 年 前

properties.

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 577 位元組
 
1/* Copyright (c) 2001, Stanford University
2 * All rights reserved
3 *
4 * See the file LICENSE.txt for information on redistributing this software.
5 */
6
7#include "cr_error.h"
8#include "cr_warp.h"
9
10void
11crWarpPoint(const float *align, const float *point, float *result)
12{
13 float w, x, y;
14
15 x = align[0] * point[0] + align[1] * point[1] + align[2];
16 y = align[3] * point[0] + align[4] * point[1] + align[5];
17 w = align[6] * point[0] + align[7] * point[1] + align[8];
18
19 if (w == 0)
20 crError("Crud in alignment matrix --> w == 0. bleh!");
21
22 result[0] = x / w;
23 result[1] = y / w;
24}
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette