egl/eglrefimpl/inc/riMath.h
author Martin Jakl <jakl.martin@cell-telecom.com>
Thu, 18 Nov 2010 23:28:27 +0000
branchEGL_MERGE
changeset 216 b87045f2f5d7
parent 118 6aeef2faff80
permissions -rw-r--r--
First drop of port from guestEGL ? enables ebt test drawing a line using composition
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
118
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
     1
#ifndef __RIMATH_H
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
     2
#define __RIMATH_H
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
     3
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
     4
/*------------------------------------------------------------------------
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
     5
 *
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
     6
 * OpenVG 1.1 Reference Implementation
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
     7
 * -----------------------------------
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
     8
 *
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
     9
 * Copyright (c) 2007 The Khronos Group Inc.
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    10
 *
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    11
 * Permission is hereby granted, free of charge, to any person obtaining a
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    12
 * copy of this software and /or associated documentation files
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    13
 * (the "Materials "), to deal in the Materials without restriction,
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    14
 * including without limitation the rights to use, copy, modify, merge,
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    15
 * publish, distribute, sublicense, and/or sell copies of the Materials,
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    16
 * and to permit persons to whom the Materials are furnished to do so,
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    17
 * subject to the following conditions: 
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    18
 *
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    19
 * The above copyright notice and this permission notice shall be included 
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    20
 * in all copies or substantial portions of the Materials. 
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    21
 *
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    22
 * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    23
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    24
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    25
 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    26
 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    27
 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    28
 * THE USE OR OTHER DEALINGS IN THE MATERIALS.
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    29
 *
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    30
 *//**
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    31
 * \file
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    32
 * \brief	Math functions, Vector and Matrix classes.
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    33
 * \note	
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    34
 *//*-------------------------------------------------------------------*/
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    35
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    36
#ifndef __RIDEFS_H
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    37
#include "riDefs.h"
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    38
#endif
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    39
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    40
#include <math.h>
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    41
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    42
namespace OpenVGRI
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    43
{
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    44
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    45
/*-------------------------------------------------------------------*//*!
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    46
* \brief	
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    47
* \param	
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    48
* \return	
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    49
* \note		
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    50
*//*-------------------------------------------------------------------*/
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    51
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    52
RI_INLINE int		RI_ISNAN(float a)
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    53
{
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    54
	RIfloatInt p;
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    55
	p.f = a;
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    56
	unsigned int exponent = (p.i>>23) & 0xff;
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    57
	unsigned int mantissa = p.i & 0x7fffff;
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    58
	if(exponent == 255 && mantissa)
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    59
		return 1;
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    60
	return 0;
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    61
}
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    62
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    63
#if (RI_MANTISSA_BITS > 23)
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    64
#error RI_MANTISSA_BITS is greater than 23
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    65
#elif (RI_EXPONENT_BITS > 8)
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    66
#error RI_EXPONENT_BITS is greater than 8
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    67
#elif (RI_MANTISSA_BITS != 23) || (RI_EXPONENT_BITS != 8)
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    68
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    69
class RIfloat
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    70
{
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    71
public:
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    72
	RIfloat() : v(0.0f)						{ removeBits(); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    73
	RIfloat(float a) : v(a)					{ removeBits(); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    74
	RIfloat(double a) : v((float)a)			{ removeBits(); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    75
	RIfloat(int a) : v((float)a)			{ removeBits(); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    76
	RIfloat(unsigned int a) : v((float)a)	{ removeBits(); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    77
	RIfloat&	operator=(const RIfloat &a)	{ v = a.v; removeBits(); return *this; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    78
	RIfloat&	operator+=(const RIfloat &a){ v += a.v; removeBits(); return *this; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    79
	RIfloat&	operator-=(const RIfloat &a){ v -= a.v; removeBits(); return *this; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    80
	RIfloat&	operator*=(const RIfloat &a){ v *= a.v; removeBits(); return *this; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    81
	RIfloat&	operator/=(const RIfloat &a){ v /= a.v; removeBits(); return *this; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    82
	RIfloat		operator-() const			{ return -v; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    83
	operator float() const					{ return v; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    84
	operator double() const					{ return (double)v; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    85
	operator int() const					{ return (int)v; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    86
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    87
	friend RIfloat	operator+(const RIfloat &a, const RIfloat &b);
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    88
	friend RIfloat	operator+(float a, const RIfloat &b);
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    89
	friend RIfloat	operator+(const RIfloat &a, float b);
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    90
	friend RIfloat	operator-(const RIfloat &a, const RIfloat &b);
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    91
	friend RIfloat	operator-(float a, const RIfloat &b);
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    92
	friend RIfloat	operator-(const RIfloat &a, float b);
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    93
	friend RIfloat	operator*(const RIfloat &a, const RIfloat &b);
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    94
	friend RIfloat	operator*(float a, const RIfloat &b);
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    95
	friend RIfloat	operator*(const RIfloat &a, float b);
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    96
	friend RIfloat	operator/(const RIfloat &a, const RIfloat &b);
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    97
	friend RIfloat	operator/(float a, const RIfloat &b);
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    98
	friend RIfloat	operator/(const RIfloat &a, float b);
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
    99
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   100
	friend bool		operator<(const RIfloat &a, const RIfloat &b);
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   101
	friend bool		operator<(float a, const RIfloat &b);
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   102
	friend bool		operator<(const RIfloat &a, float b);
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   103
	friend bool		operator>(const RIfloat &a, const RIfloat &b);
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   104
	friend bool		operator>(float a, const RIfloat &b);
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   105
	friend bool		operator>(const RIfloat &a, float b);
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   106
	friend bool		operator<=(const RIfloat &a, const RIfloat &b);
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   107
	friend bool		operator<=(float a, const RIfloat &b);
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   108
	friend bool		operator<=(const RIfloat &a, float b);
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   109
	friend bool		operator>=(const RIfloat &a, const RIfloat &b);
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   110
	friend bool		operator>=(float a, const RIfloat &b);
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   111
	friend bool		operator>=(const RIfloat &a, float b);
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   112
	friend bool		operator==(const RIfloat &a, const RIfloat &b);
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   113
	friend bool		operator==(float a, const RIfloat &b);
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   114
	friend bool		operator==(const RIfloat &a, float b);
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   115
	friend bool		operator!=(const RIfloat &a, const RIfloat &b);
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   116
	friend bool		operator!=(float a, const RIfloat &b);
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   117
	friend bool		operator!=(const RIfloat &a, float b);
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   118
private:
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   119
	void	removeBits()
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   120
	{
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   121
		RIfloatInt p;
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   122
		p.f = v;
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   123
		unsigned int exponent = (p.i>>23) & 0xff;
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   124
		if(exponent == 0 || exponent == 255)
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   125
			return;	//zero, denormal, infinite, or NaN
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   126
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   127
		p.i &= ~((1<<(23-RI_MANTISSA_BITS))-1);
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   128
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   129
#if (RI_EXPONENT_BITS != 8)
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   130
		if (exponent > 127 + (1 << (RI_EXPONENT_BITS-1)))
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   131
			exponent = 127 + (1 << (RI_EXPONENT_BITS-1));
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   132
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   133
		if (exponent < 127 + 1 - (1 << (RI_EXPONENT_BITS-1)))
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   134
			exponent = 127 + 1 - (1 << (RI_EXPONENT_BITS-1));
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   135
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   136
		p.i &= ~(0xff<<23);
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   137
		p.i |= exponent<<23;
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   138
#endif
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   139
		v = p.f;
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   140
	}
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   141
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   142
	float		v;
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   143
};
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   144
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   145
RI_INLINE RIfloat operator+(const RIfloat &a, const RIfloat &b)	{ return RIfloat(a.v+b.v); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   146
RI_INLINE RIfloat operator+(float a, const RIfloat &b)			{ return RIfloat(a+b.v); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   147
RI_INLINE RIfloat operator+(const RIfloat &a, float b)			{ return RIfloat(a.v+b); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   148
RI_INLINE RIfloat operator-(const RIfloat &a, const RIfloat &b)	{ return RIfloat(a.v-b.v); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   149
RI_INLINE RIfloat operator-(float a, const RIfloat &b)			{ return RIfloat(a-b.v); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   150
RI_INLINE RIfloat operator-(const RIfloat &a, float b)			{ return RIfloat(a.v-b); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   151
RI_INLINE RIfloat operator*(const RIfloat &a, const RIfloat &b)	{ return RIfloat(a.v*b.v); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   152
RI_INLINE RIfloat operator*(float a, const RIfloat &b)			{ return RIfloat(a*b.v); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   153
RI_INLINE RIfloat operator*(const RIfloat &a, float b)			{ return RIfloat(a.v*b); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   154
RI_INLINE RIfloat operator/(const RIfloat &a, const RIfloat &b)	{ return RIfloat(a.v/b.v); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   155
RI_INLINE RIfloat operator/(float a, const RIfloat &b)			{ return RIfloat(a/b.v); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   156
RI_INLINE RIfloat operator/(const RIfloat &a, float b)			{ return RIfloat(a.v/b); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   157
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   158
RI_INLINE bool operator<(const RIfloat &a, const RIfloat &b)	{ return a.v < b.v ? true : false; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   159
RI_INLINE bool operator<(float a, const RIfloat &b)				{ return a < b.v ? true : false; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   160
RI_INLINE bool operator<(const RIfloat &a, float b)				{ return a.v < b ? true : false; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   161
RI_INLINE bool operator>(const RIfloat &a, const RIfloat &b)	{ return a.v > b.v ? true : false; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   162
RI_INLINE bool operator>(float a, const RIfloat &b)				{ return a > b.v ? true : false; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   163
RI_INLINE bool operator>(const RIfloat &a, float b)				{ return a.v > b ? true : false; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   164
RI_INLINE bool operator<=(const RIfloat &a, const RIfloat &b)	{ return a.v <= b.v ? true : false; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   165
RI_INLINE bool operator<=(float a, const RIfloat &b)			{ return a <= b.v ? true : false; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   166
RI_INLINE bool operator<=(const RIfloat &a, float b)			{ return a.v <= b ? true : false; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   167
RI_INLINE bool operator>=(const RIfloat &a, const RIfloat &b)	{ return a.v >= b.v ? true : false; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   168
RI_INLINE bool operator>=(float a, const RIfloat &b)			{ return a >= b.v ? true : false; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   169
RI_INLINE bool operator>=(const RIfloat &a, float b)			{ return a.v >= b ? true : false; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   170
RI_INLINE bool operator==(const RIfloat &a, const RIfloat &b)	{ return a.v == b.v ? true : false; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   171
RI_INLINE bool operator==(float a, const RIfloat &b)			{ return a == b.v ? true : false; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   172
RI_INLINE bool operator==(const RIfloat &a, float b)			{ return a.v == b ? true : false; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   173
RI_INLINE bool operator!=(const RIfloat &a, const RIfloat &b)	{ return a.v != b.v ? true : false; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   174
RI_INLINE bool operator!=(float a, const RIfloat &b)			{ return a != b.v ? true : false; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   175
RI_INLINE bool operator!=(const RIfloat &a, float b)			{ return a.v != b ? true : false; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   176
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   177
#else
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   178
typedef float RIfloat;
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   179
#endif
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   180
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   181
#define	PI						3.141592654f
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   182
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   183
RI_INLINE RIfloat	RI_MAX(RIfloat a, RIfloat b)				{ return (a > b) ? a : b; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   184
RI_INLINE RIfloat	RI_MIN(RIfloat a, RIfloat b)				{ return (a < b) ? a : b; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   185
RI_INLINE RIfloat	RI_CLAMP(RIfloat a, RIfloat l, RIfloat h)	{ if(RI_ISNAN(a)) return l; RI_ASSERT(l <= h); return (a < l) ? l : (a > h) ? h : a; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   186
RI_INLINE void		RI_SWAP(RIfloat &a, RIfloat &b)				{ RIfloat tmp = a; a = b; b = tmp; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   187
RI_INLINE RIfloat	RI_ABS(RIfloat a)							{ return (a < 0.0f) ? -a : a; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   188
RI_INLINE RIfloat	RI_SQR(RIfloat a)							{ return a * a; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   189
RI_INLINE RIfloat	RI_DEG_TO_RAD(RIfloat a)					{ return a * PI / 180.0f; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   190
RI_INLINE RIfloat	RI_RAD_TO_DEG(RIfloat a)					{ return a * 180.0f/ PI; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   191
RI_INLINE RIfloat	RI_MOD(RIfloat a, RIfloat b)				{ if(RI_ISNAN(a) || RI_ISNAN(b)) return 0.0f; RI_ASSERT(b >= 0.0f); if(b == 0.0f) return 0.0f; RIfloat f = (RIfloat)fmod(a, b); if(f < 0.0f) f += b; RI_ASSERT(f >= 0.0f && f <= b); return f; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   192
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   193
RI_INLINE int		RI_INT_MAX(int a, int b)			{ return (a > b) ? a : b; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   194
RI_INLINE int		RI_INT_MIN(int a, int b)			{ return (a < b) ? a : b; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   195
RI_INLINE void		RI_INT_SWAP(int &a, int &b)			{ int tmp = a; a = b; b = tmp; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   196
RI_INLINE int		RI_INT_MOD(int a, int b)			{ RI_ASSERT(b >= 0); if(!b) return 0; int i = a % b; if(i < 0) i += b; RI_ASSERT(i >= 0 && i < b); return i; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   197
RI_INLINE int		RI_INT_ADDSATURATE(int a, int b)	{ RI_ASSERT(b >= 0); int r = a + b; return (r >= a) ? r : RI_INT32_MAX; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   198
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   199
class Matrix3x3;
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   200
class Vector2;
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   201
class Vector3;
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   202
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   203
//==============================================================================================
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   204
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   205
//MatrixRxC, R = number of rows, C = number of columns
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   206
//indexing: matrix[row][column]
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   207
//Matrix3x3 inline functions cannot be inside the class because Vector3 is not defined yet when Matrix3x3 is defined
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   208
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   209
class Matrix3x3
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   210
{
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   211
public:
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   212
	RI_INLINE					Matrix3x3		();						//initialized to identity
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   213
	RI_INLINE					Matrix3x3		( const Matrix3x3& m );
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   214
	RI_INLINE					Matrix3x3		( RIfloat m00, RIfloat m01, RIfloat m02, RIfloat m10, RIfloat m11, RIfloat m12, RIfloat m20, RIfloat m21, RIfloat m22 );
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   215
	RI_INLINE					~Matrix3x3		();
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   216
	RI_INLINE Matrix3x3&		operator=		( const Matrix3x3& m );
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   217
	RI_INLINE Vector3&			operator[]		( int i );				//returns a row vector
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   218
	RI_INLINE const Vector3&	operator[]		( int i ) const;
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   219
	RI_INLINE void				set				( RIfloat m00, RIfloat m01, RIfloat m02, RIfloat m10, RIfloat m11, RIfloat m12, RIfloat m20, RIfloat m21, RIfloat m22 );
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   220
	RI_INLINE const Vector3		getRow			( int i ) const;
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   221
	RI_INLINE const Vector3		getColumn		( int i ) const;
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   222
	RI_INLINE void				setRow			( int i, const Vector3& v );
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   223
	RI_INLINE void				setColumn		( int i, const Vector3& v );
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   224
	RI_INLINE void				operator*=		( const Matrix3x3& m );
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   225
	RI_INLINE void				operator*=		( RIfloat f );
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   226
	RI_INLINE void				operator+=		( const Matrix3x3& m );
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   227
	RI_INLINE void				operator-=		( const Matrix3x3& m );
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   228
	RI_INLINE const Matrix3x3	operator-		() const;
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   229
	RI_INLINE void				identity		();
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   230
	RI_INLINE void				transpose		();
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   231
	bool						invert			();	//if the matrix is singular, returns false and leaves it unmodified
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   232
	RI_INLINE RIfloat				det				() const;
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   233
	RI_INLINE bool				isAffine		() const;
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   234
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   235
private:
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   236
	RIfloat						matrix[3][3];
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   237
};
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   238
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   239
//==============================================================================================
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   240
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   241
class Vector2
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   242
{
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   243
public:
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   244
	RI_INLINE					Vector2			() : x(0.0f), y(0.0f)					{}
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   245
	RI_INLINE					Vector2			( const Vector2& v ) : x(v.x), y(v.y)	{}
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   246
	RI_INLINE					Vector2			( RIfloat fx, RIfloat fy ) : x(fx), y(fy)	{}
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   247
	RI_INLINE					~Vector2		()								{}
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   248
	RI_INLINE Vector2&			operator=		( const Vector2& v )			{ x = v.x; y = v.y; return *this; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   249
	RI_INLINE RIfloat&			operator[]		( int i )						{ RI_ASSERT(i>=0&&i<2); return (&x)[i]; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   250
	RI_INLINE const RIfloat&	operator[]		( int i ) const					{ RI_ASSERT(i>=0&&i<2); return (&x)[i]; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   251
	RI_INLINE void				set				( RIfloat fx, RIfloat fy )			{ x = fx; y = fy; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   252
	RI_INLINE void				operator*=		( RIfloat f )						{ x *= f; y *= f; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   253
	RI_INLINE void				operator+=		( const Vector2& v )			{ x += v.x; y += v.y; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   254
	RI_INLINE void				operator-=		( const Vector2& v )			{ x -= v.x; y -= v.y; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   255
	RI_INLINE const Vector2		operator-		() const						{ return Vector2(-x,-y); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   256
	//if the vector is zero, returns false and leaves it unmodified
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   257
	RI_INLINE bool				normalize		()								{ double l = (double)x*(double)x+(double)y*(double)y; if( l == 0.0 ) return false; l = 1.0 / sqrt(l); x = (RIfloat)((double)x * l); y = (RIfloat)((double)y * l); return true; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   258
	RI_INLINE RIfloat			length			() const						{ return (RIfloat)sqrt((double)x*(double)x+(double)y*(double)y); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   259
	RI_INLINE void				scale			( const Vector2& v )			{ x *= v.x; y *= v.y; }	//component-wise scale
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   260
	RI_INLINE void				negate			()								{ x = -x; y = -y; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   261
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   262
	RIfloat						x,y;
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   263
};
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   264
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   265
//==============================================================================================
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   266
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   267
class Vector3
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   268
{
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   269
public:
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   270
	RI_INLINE					Vector3			() : x(0.0f), y(0.0f), z(0.0f)							{}
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   271
	RI_INLINE					Vector3			( const Vector3& v ) : x(v.x), y(v.y), z(v.z)			{}
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   272
	RI_INLINE					Vector3			( RIfloat fx, RIfloat fy, RIfloat fz ) : x(fx), y(fy), z(fz)	{}
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   273
	RI_INLINE					~Vector3		()								{}
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   274
	RI_INLINE Vector3&			operator=		( const Vector3& v )			{ x = v.x; y = v.y; z = v.z; return *this; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   275
	RI_INLINE RIfloat&			operator[]		( int i )						{ RI_ASSERT(i>=0&&i<3); return (&x)[i]; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   276
	RI_INLINE const RIfloat&	operator[]		( int i ) const					{ RI_ASSERT(i>=0&&i<3); return (&x)[i]; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   277
	RI_INLINE void				set				( RIfloat fx, RIfloat fy, RIfloat fz ){ x = fx; y = fy; z = fz; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   278
	RI_INLINE void				operator*=		( RIfloat f )						{ x *= f; y *= f; z *= f; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   279
	RI_INLINE void				operator+=		( const Vector3& v )			{ x += v.x; y += v.y; z += v.z; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   280
	RI_INLINE void				operator-=		( const Vector3& v )			{ x -= v.x; y -= v.y; z -= v.z; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   281
	RI_INLINE const Vector3		operator-		() const						{ return Vector3(-x,-y,-z); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   282
	//if the vector is zero, returns false and leaves it unmodified
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   283
	RI_INLINE bool				normalize		()								{ double l = (double)x*(double)x+(double)y*(double)y+(double)z*(double)z; if( l == 0.0 ) return false; l = 1.0 / sqrt(l); x = (RIfloat)((double)x * l); y = (RIfloat)((double)y * l); z = (RIfloat)((double)z * l); return true; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   284
	RI_INLINE RIfloat			length			() const						{ return (RIfloat)sqrt((double)x*(double)x+(double)y*(double)y+(double)z*(double)z); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   285
	RI_INLINE void				scale			( const Vector3& v )			{ x *= v.x; y *= v.y; z *= v.z; }	//component-wise scale
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   286
	RI_INLINE void				negate			()								{ x = -x; y = -y; z = -z; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   287
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   288
	RIfloat						x,y,z;
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   289
};
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   290
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   291
//==============================================================================================
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   292
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   293
//Vector2 global functions
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   294
RI_INLINE bool			operator==	( const Vector2& v1, const Vector2& v2 )	{ return (v1.x == v2.x) && (v1.y == v2.y); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   295
RI_INLINE bool			operator!=	( const Vector2& v1, const Vector2& v2 )	{ return (v1.x != v2.x) || (v1.y != v2.y); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   296
RI_INLINE bool			isEqual		( const Vector2& v1, const Vector2& v2, RIfloat epsilon )	{ return RI_SQR(v2.x-v1.x) + RI_SQR(v2.y-v1.y) <= epsilon*epsilon; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   297
RI_INLINE bool			isZero		( const Vector2& v )						{ return (v.x == 0.0f) && (v.y == 0.0f); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   298
RI_INLINE const Vector2	operator*	( RIfloat f, const Vector2& v )				{ return Vector2(v.x*f,v.y*f); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   299
RI_INLINE const Vector2	operator*	( const Vector2& v, RIfloat f )				{ return Vector2(v.x*f,v.y*f); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   300
RI_INLINE const Vector2	operator+	( const Vector2& v1, const Vector2& v2 )	{ return Vector2(v1.x+v2.x, v1.y+v2.y); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   301
RI_INLINE const Vector2	operator-	( const Vector2& v1, const Vector2& v2 )	{ return Vector2(v1.x-v2.x, v1.y-v2.y); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   302
RI_INLINE RIfloat		dot			( const Vector2& v1, const Vector2& v2 )	{ return v1.x*v2.x+v1.y*v2.y; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   303
//if v is a zero vector, returns a zero vector
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   304
RI_INLINE const Vector2	normalize	( const Vector2& v )						{ double l = (double)v.x*(double)v.x+(double)v.y*(double)v.y; if( l != 0.0 ) l = 1.0 / sqrt(l); return Vector2((RIfloat)((double)v.x * l), (RIfloat)((double)v.y * l)); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   305
//if onThis is a zero vector, returns a zero vector
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   306
RI_INLINE const Vector2	project		( const Vector2& v, const Vector2& onThis ) { RIfloat l = dot(onThis,onThis); if( l != 0.0f ) l = dot(v, onThis)/l; return onThis * l; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   307
RI_INLINE const Vector2	lerp		( const Vector2& v1, const Vector2& v2, RIfloat ratio )	{ return v1 + ratio * (v2 - v1); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   308
RI_INLINE const Vector2	scale		( const Vector2& v1, const Vector2& v2 )	{ return Vector2(v1.x*v2.x, v1.y*v2.y); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   309
//matrix * column vector. The input vector2 is implicitly expanded to (x,y,1)
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   310
RI_INLINE const Vector2 affineTransform( const Matrix3x3& m, const Vector2& v )	{ RI_ASSERT(m.isAffine()); return Vector2(v.x * m[0][0] + v.y * m[0][1] + m[0][2], v.x * m[1][0] + v.y * m[1][1] + m[1][2]); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   311
//matrix * column vector. The input vector2 is implicitly expanded to (x,y,0)
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   312
RI_INLINE const Vector2 affineTangentTransform(const Matrix3x3& m, const Vector2& v)	{ RI_ASSERT(m.isAffine()); return Vector2(v.x * m[0][0] + v.y * m[0][1], v.x * m[1][0] + v.y * m[1][1]); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   313
RI_INLINE const Vector2 perpendicularCW(const Vector2& v)						{ return Vector2(v.y, -v.x); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   314
RI_INLINE const Vector2 perpendicularCCW(const Vector2& v)						{ return Vector2(-v.y, v.x); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   315
RI_INLINE const Vector2 perpendicular(const Vector2& v, bool cw)				{ if(cw) return Vector2(v.y, -v.x); return Vector2(-v.y, v.x); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   316
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   317
//==============================================================================================
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   318
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   319
//Vector3 global functions
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   320
RI_INLINE bool			operator==	( const Vector3& v1, const Vector3& v2 )	{ return (v1.x == v2.x) && (v1.y == v2.y) && (v1.z == v2.z); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   321
RI_INLINE bool			operator!=	( const Vector3& v1, const Vector3& v2 )	{ return (v1.x != v2.x) || (v1.y != v2.y) || (v1.z != v2.z); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   322
RI_INLINE bool			isEqual		( const Vector3& v1, const Vector3& v2, RIfloat epsilon )	{ return RI_SQR(v2.x-v1.x) + RI_SQR(v2.y-v1.y) + RI_SQR(v2.z-v1.z) <= epsilon*epsilon; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   323
RI_INLINE const Vector3	operator*	( RIfloat f, const Vector3& v )				{ return Vector3(v.x*f,v.y*f,v.z*f); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   324
RI_INLINE const Vector3	operator*	( const Vector3& v, RIfloat f )				{ return Vector3(v.x*f,v.y*f,v.z*f); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   325
RI_INLINE const Vector3	operator+	( const Vector3& v1, const Vector3& v2 )	{ return Vector3(v1.x+v2.x, v1.y+v2.y, v1.z+v2.z); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   326
RI_INLINE const Vector3	operator-	( const Vector3& v1, const Vector3& v2 )	{ return Vector3(v1.x-v2.x, v1.y-v2.y, v1.z-v2.z); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   327
RI_INLINE RIfloat		dot			( const Vector3& v1, const Vector3& v2 )	{ return v1.x*v2.x+v1.y*v2.y+v1.z*v2.z; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   328
RI_INLINE const Vector3	cross		( const Vector3& v1, const Vector3& v2 )	{ return Vector3( v1.y*v2.z-v1.z*v2.y, v1.z*v2.x-v1.x*v2.z, v1.x*v2.y-v1.y*v2.x ); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   329
//if v is a zero vector, returns a zero vector
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   330
RI_INLINE const Vector3	normalize	( const Vector3& v )						{ double l = (double)v.x*(double)v.x+(double)v.y*(double)v.y+(double)v.z*(double)v.z; if( l != 0.0 ) l = 1.0 / sqrt(l); return Vector3((RIfloat)((double)v.x * l), (RIfloat)((double)v.y * l), (RIfloat)((double)v.z * l)); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   331
RI_INLINE const Vector3	lerp		( const Vector3& v1, const Vector3& v2, RIfloat ratio )	{ return v1 + ratio * (v2 - v1); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   332
RI_INLINE const Vector3	scale		( const Vector3& v1, const Vector3& v2 )	{ return Vector3(v1.x*v2.x, v1.y*v2.y, v1.z*v2.z); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   333
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   334
//==============================================================================================
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   335
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   336
//matrix * column vector
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   337
RI_INLINE const Vector3	operator*	( const Matrix3x3& m, const Vector3& v)		{ return Vector3( v.x*m[0][0]+v.y*m[0][1]+v.z*m[0][2], v.x*m[1][0]+v.y*m[1][1]+v.z*m[1][2], v.x*m[2][0]+v.y*m[2][1]+v.z*m[2][2] ); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   338
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   339
//==============================================================================================
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   340
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   341
//Matrix3x3 global functions
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   342
RI_INLINE bool				operator==	( const Matrix3x3& m1, const Matrix3x3& m2 )	{ for(int i=0;i<3;i++) for(int j=0;j<3;j++) if( m1[i][j] != m2[i][j] ) return false; return true; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   343
RI_INLINE bool				operator!=	( const Matrix3x3& m1, const Matrix3x3& m2 )	{ return !(m1 == m2); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   344
RI_INLINE const Matrix3x3	operator*	( const Matrix3x3& m1, const Matrix3x3& m2 )	{ Matrix3x3 t; for(int i=0;i<3;i++) for(int j=0;j<3;j++) t[i][j] = m1[i][0] * m2[0][j] + m1[i][1] * m2[1][j] + m1[i][2] * m2[2][j]; return t; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   345
RI_INLINE const Matrix3x3	operator*	( RIfloat f, const Matrix3x3& m )					{ Matrix3x3 t(m); t *= f; return t; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   346
RI_INLINE const Matrix3x3	operator*	( const Matrix3x3& m, RIfloat f )					{ Matrix3x3 t(m); t *= f; return t; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   347
RI_INLINE const Matrix3x3	operator+	( const Matrix3x3& m1, const Matrix3x3& m2 )	{ Matrix3x3 t(m1); t += m2; return t; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   348
RI_INLINE const Matrix3x3	operator-	( const Matrix3x3& m1, const Matrix3x3& m2 )	{ Matrix3x3 t(m1); t -= m2; return t; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   349
RI_INLINE const Matrix3x3	transpose	( const Matrix3x3& m )							{ Matrix3x3 t(m); t.transpose(); return t; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   350
// if the matrix is singular, returns it unmodified
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   351
RI_INLINE const Matrix3x3	invert		( const Matrix3x3& m )							{ Matrix3x3 t(m); t.invert(); return t; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   352
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   353
//==============================================================================================
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   354
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   355
//Matrix3x3 inline functions (cannot be inside the class because Vector3 is not defined yet when Matrix3x3 is defined)
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   356
RI_INLINE					Matrix3x3::Matrix3x3	()									{ identity(); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   357
RI_INLINE					Matrix3x3::Matrix3x3	( const Matrix3x3& m )				{ *this = m; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   358
RI_INLINE					Matrix3x3::Matrix3x3	( RIfloat m00, RIfloat m01, RIfloat m02, RIfloat m10, RIfloat m11, RIfloat m12, RIfloat m20, RIfloat m21, RIfloat m22 )	{ set(m00,m01,m02,m10,m11,m12,m20,m21,m22); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   359
RI_INLINE					Matrix3x3::~Matrix3x3	()									{}
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   360
RI_INLINE Matrix3x3&		Matrix3x3::operator=	( const Matrix3x3& m )				{ for(int i=0;i<3;i++) for(int j=0;j<3;j++) matrix[i][j] = m.matrix[i][j]; return *this; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   361
RI_INLINE Vector3&			Matrix3x3::operator[]	( int i )							{ RI_ASSERT(i>=0&&i<3); return (Vector3&)matrix[i][0]; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   362
RI_INLINE const Vector3&	Matrix3x3::operator[]	( int i ) const						{ RI_ASSERT(i>=0&&i<3); return (const Vector3&)matrix[i][0]; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   363
RI_INLINE void				Matrix3x3::set			( RIfloat m00, RIfloat m01, RIfloat m02, RIfloat m10, RIfloat m11, RIfloat m12, RIfloat m20, RIfloat m21, RIfloat m22 ) { matrix[0][0] = m00; matrix[0][1] = m01; matrix[0][2] = m02; matrix[1][0] = m10; matrix[1][1] = m11; matrix[1][2] = m12; matrix[2][0] = m20; matrix[2][1] = m21; matrix[2][2] = m22; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   364
RI_INLINE const Vector3		Matrix3x3::getRow		( int i ) const						{ RI_ASSERT(i>=0&&i<3); return Vector3(matrix[i][0], matrix[i][1], matrix[i][2]); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   365
RI_INLINE const Vector3		Matrix3x3::getColumn	( int i ) const						{ RI_ASSERT(i>=0&&i<3); return Vector3(matrix[0][i], matrix[1][i], matrix[2][i]); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   366
RI_INLINE void				Matrix3x3::setRow		( int i, const Vector3& v )			{ RI_ASSERT(i>=0&&i<3); matrix[i][0] = v.x; matrix[i][1] = v.y; matrix[i][2] = v.z; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   367
RI_INLINE void				Matrix3x3::setColumn	( int i, const Vector3& v )			{ RI_ASSERT(i>=0&&i<3); matrix[0][i] = v.x; matrix[1][i] = v.y; matrix[2][i] = v.z; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   368
RI_INLINE void				Matrix3x3::operator*=	( const Matrix3x3& m )				{ *this = *this * m; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   369
RI_INLINE void				Matrix3x3::operator*=	( RIfloat f )							{ for(int i=0;i<3;i++) for(int j=0;j<3;j++) matrix[i][j] *= f; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   370
RI_INLINE void				Matrix3x3::operator+=	( const Matrix3x3& m )				{ for(int i=0;i<3;i++) for(int j=0;j<3;j++) matrix[i][j] += m.matrix[i][j]; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   371
RI_INLINE void				Matrix3x3::operator-=	( const Matrix3x3& m )				{ for(int i=0;i<3;i++) for(int j=0;j<3;j++) matrix[i][j] -= m.matrix[i][j]; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   372
RI_INLINE const Matrix3x3	Matrix3x3::operator-	() const							{ return Matrix3x3( -matrix[0][0],-matrix[0][1],-matrix[0][2], -matrix[1][0],-matrix[1][1],-matrix[1][2], -matrix[2][0],-matrix[2][1],-matrix[2][2]); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   373
RI_INLINE void				Matrix3x3::identity		()									{ for(int i=0;i<3;i++) for(int j=0;j<3;j++) matrix[i][j] = (i == j) ? 1.0f : 0.0f; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   374
RI_INLINE void				Matrix3x3::transpose	()									{ RI_SWAP(matrix[1][0], matrix[0][1]); RI_SWAP(matrix[2][0], matrix[0][2]); RI_SWAP(matrix[2][1], matrix[1][2]); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   375
RI_INLINE RIfloat			Matrix3x3::det			() const							{ return matrix[0][0] * (matrix[1][1]*matrix[2][2] - matrix[2][1]*matrix[1][2]) + matrix[0][1] * (matrix[2][0]*matrix[1][2] - matrix[1][0]*matrix[2][2]) + matrix[0][2] * (matrix[1][0]*matrix[2][1] - matrix[2][0]*matrix[1][1]); }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   376
RI_INLINE bool				Matrix3x3::isAffine		() const							{ if(matrix[2][0] == 0.0f && matrix[2][1] == 0.0f && matrix[2][2] == 1.0f) return true; return false; }
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   377
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   378
//==============================================================================================
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   379
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   380
}	//namespace OpenVGRI
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   381
6aeef2faff80 Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff changeset
   382
#endif /* __RIMATH_H */