1
/*****************************************************************************/
2
// Copyright 2006 Adobe Systems Incorporated
3
// All Rights Reserved.
5
// NOTICE: Adobe permits you to use, modify, and distribute this file in
6
// accordance with the terms of the Adobe license agreement accompanying it.
7
/*****************************************************************************/
9
/* $Id: //mondo/dng_sdk_1_3/dng_sdk/source/dng_xy_coord.h#1 $ */
10
/* $DateTime: 2009/06/22 05:04:49 $ */
11
/* $Change: 578634 $ */
12
/* $Author: tknoll $ */
14
/*****************************************************************************/
16
#ifndef __dng_xy_coord__
17
#define __dng_xy_coord__
19
/*****************************************************************************/
21
#include "dng_classes.h"
22
#include "dng_types.h"
24
/*****************************************************************************/
42
dng_xy_coord (real64 xx, real64 yy)
60
bool NotValid () const
65
bool operator== (const dng_xy_coord &coord) const
67
return coord.x == x &&
71
bool operator!= (const dng_xy_coord &coord) const
73
return !(*this == coord);
78
/*****************************************************************************/
80
inline dng_xy_coord operator+ (const dng_xy_coord &A,
81
const dng_xy_coord &B)
93
/*****************************************************************************/
95
inline dng_xy_coord operator- (const dng_xy_coord &A,
96
const dng_xy_coord &B)
108
/*****************************************************************************/
110
inline dng_xy_coord operator* (real64 scale,
111
const dng_xy_coord &A)
123
/******************************************************************************/
125
inline real64 operator* (const dng_xy_coord &A,
126
const dng_xy_coord &B)
134
/*****************************************************************************/
136
// Standard xy coordinate constants.
138
inline dng_xy_coord StdA_xy_coord ()
140
return dng_xy_coord (0.4476, 0.4074);
143
inline dng_xy_coord D50_xy_coord ()
145
return dng_xy_coord (0.3457, 0.3585);
148
inline dng_xy_coord D55_xy_coord ()
150
return dng_xy_coord (0.3324, 0.3474);
153
inline dng_xy_coord D65_xy_coord ()
155
return dng_xy_coord (0.3127, 0.3290);
158
inline dng_xy_coord D75_xy_coord ()
160
return dng_xy_coord (0.2990, 0.3149);
163
/*****************************************************************************/
165
// Convert between xy coordinates and XYZ coordinates.
167
dng_xy_coord XYZtoXY (const dng_vector_3 &coord);
169
dng_vector_3 XYtoXYZ (const dng_xy_coord &coord);
171
/*****************************************************************************/
173
// Returns the ICC XYZ profile connection space white point.
175
dng_xy_coord PCStoXY ();
177
dng_vector_3 PCStoXYZ ();
179
/*****************************************************************************/
183
/*****************************************************************************/