#include <patch.h>
Public Member Functions | |
void | pack (const CVector &v, const CVector &bias, float scale) |
void | serial (NLMISC::IStream &f) |
void | unpack (CVector &v, const CVector &bias, float scale) const |
Data Fields | |
sint16 | x |
sint16 | y |
sint16 | z |
|
Definition at line 108 of file patch.h. References NLMISC::clamp(), sint16, v, x, NLMISC::CVector::x, y, NLMISC::CVector::y, z, and NLMISC::CVector::z. Referenced by NL3D::CZone::applyHeightField(), and NL3D::CZone::build().
00109 { 00110 float xr,yr,zr; 00111 xr= (v.x - bias.x)/scale; 00112 yr= (v.y - bias.y)/scale; 00113 zr= (v.z - bias.z)/scale; 00114 NLMISC::clamp(xr, -32768, 32767); 00115 NLMISC::clamp(yr, -32768, 32767); 00116 NLMISC::clamp(zr, -32768, 32767); 00117 x= (sint16)xr; 00118 y= (sint16)yr; 00119 z= (sint16)zr; 00120 } |
|
Definition at line 127 of file patch.h. References NLMISC::IStream::serial(), x, y, and z.
|
|
Definition at line 121 of file patch.h. References v, NLMISC::CVector::x, x, NLMISC::CVector::y, y, NLMISC::CVector::z, and z. Referenced by NL3D::CZone::applyHeightField(), NL3D::CZone::retrieve(), and NL3D::CPatch::unpack().
|
|
|
|
|
|
|