#include <samplist.h>
Inheritance diagram for CSampleItem:
Public Member Functions | |
CSampleItem () | |
default constructor | |
CSampleItem (DocCoord Coord, MILLIPOINT Distance, UINT32 Pressure) | |
constructor with initialisation | |
CSampleItem (const CSampleItem &Other) | |
copy constructor | |
~CSampleItem () | |
CSampleItem | operator= (const CSampleItem &Other) |
assignment operator | |
BOOL | operator== (const CSampleItem &Other) |
equality operator | |
CSampleItem | InterpolateItems (CSampleItem &Other, double Proportion) |
equality operator | |
BOOL | WriteNative (CXaraFileRecord *pRecord) |
Writes this sampledata item to a record. | |
Public Attributes | |
DocCoord | m_Coord |
MILLIPOINT | m_Distance |
UINT32 | m_Pressure |
Definition at line 121 of file samplist.h.
|
default constructor
Definition at line 135 of file samplist.cpp. 00136 { 00137 m_Distance = 0; 00138 m_Coord.x = m_Coord.y = 0; 00139 m_Pressure = 0; 00140 }
|
|
constructor with initialisation
Definition at line 158 of file samplist.cpp. 00159 { 00160 m_Coord = Coord; 00161 m_Distance = Distance; 00162 m_Pressure = Pressure; 00163 00164 }
|
|
copy constructor
Definition at line 181 of file samplist.cpp. 00182 { 00183 m_Distance = Other.m_Distance; 00184 m_Coord = Other.m_Coord; 00185 m_Pressure = Other.m_Pressure; 00186 00187 }
|
|
Definition at line 129 of file samplist.h.
|
|
equality operator
Definition at line 251 of file samplist.cpp. 00252 { 00253 CSampleItem NewItem; 00254 00255 if (Proportion < 0.0 || Proportion > 1.0) 00256 { 00257 ERROR3("Invalid proportion value in CSampleItem::InterpolateItems"); 00258 return NewItem; 00259 } 00260 00261 NewItem.m_Distance = (INT32)(((double)m_Distance * Proportion) + ((double)Other.m_Distance * (1-Proportion))); 00262 MILLIPOINT XVal = (INT32)((m_Coord.x * Proportion) + (Other.m_Coord.x * (1 - Proportion))); 00263 MILLIPOINT YVal = (INT32)((m_Coord.y * Proportion) + (Other.m_Coord.y * (1 - Proportion))); 00264 00265 NewItem.m_Coord.x = XVal; 00266 NewItem.m_Coord.y = YVal; 00267 00268 NewItem.m_Pressure = (UINT32)((m_Pressure * Proportion) + (Other.m_Pressure * (1-Proportion))); 00269 00270 return NewItem; 00271 }
|
|
assignment operator
Definition at line 205 of file samplist.cpp. 00206 { 00207 m_Coord = Other.m_Coord; 00208 m_Distance = Other.m_Distance; 00209 m_Pressure = Other.m_Pressure; 00210 return *this; 00211 }
|
|
equality operator
Definition at line 229 of file samplist.cpp. 00230 { 00231 BOOL bDiff = (m_Coord != Other.m_Coord || 00232 m_Distance != Other.m_Distance || 00233 m_Pressure != Other.m_Pressure); 00234 return bDiff; 00235 }
|
|
Writes this sampledata item to a record.
Definition at line 288 of file samplist.cpp. 00289 { 00290 ERROR2IF(pRecord == NULL, FALSE, "Record is NULL in CSampleItem::WriteNative"); 00291 00292 BOOL ok = pRecord->WriteINT32((INT32)m_Pressure); 00293 if (ok) ok = pRecord->WriteCoord(m_Coord); 00294 if (ok) ok = pRecord->WriteINT32(m_Distance); 00295 00296 return ok; 00297 }
|
|
Definition at line 141 of file samplist.h. |
|
Definition at line 142 of file samplist.h. |
|
Definition at line 143 of file samplist.h. |