VirtualBox

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

Last change on this file since 62479 was 53726, checked in by vboxsync, 10 years ago

properties.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 577 bytes
Line 
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}
Note: See TracBrowser for help on using the repository browser.

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