3ds Max C++ API Reference
Loading...
Searching...
No Matches
3dsmaxdlport.h File Reference
#include "utilexp.h"
#include "strbasic.h"
#include "BuildWarnings.h"
#include <wtypes.h>
#include <cmath>
#include <cstdlib>

Macros

#define DL_STDEXT   stdext
#define DL_NON_RTTI_OBJECT   std::__non_rtti_object
#define DL_TYPENAME_OUTSIDE_TEMPLATE   typename

Typedefs

typedef INT_PTR(CALLBACK * DL_NOTQUITE_WNDPROC) (HWND, UINT, WPARAM, LPARAM)

Enumerations

enum  { FNV1_32_INIT = 0x811c9dc5 , FNV_32_PRIME = 0x01000193 }

Functions

template<typename DataPtr>
DataPtr DLGetWindowLongPtr (HWND hWnd, int n=GWLP_USERDATA, DataPtr=NULL)
template<typename DataPtr>
DataPtr DLGetWindowLongPtrA (HWND hWnd, int n=GWLP_USERDATA)
template<typename DataPtr>
DataPtr DLGetWindowLongPtrW (HWND hWnd, int n=GWLP_USERDATA)
template<typename DataPtr>
DataPtr DLGetWindowLongPtr (HWND hWnd, DataPtr *pPtr, int n=GWLP_USERDATA)
template<>
bool DLGetWindowLongPtr (HWND hWnd, int n, bool)
WNDPROC DLGetWindowProc (HWND hWnd)
WNDPROC DLGetWindowProcA (HWND hWnd)
WNDPROC DLGetWindowProcW (HWND hWnd)
HINSTANCE DLGetWindowInstance (HWND hWnd)
template<typename Type>
Type DLSetWindowLongPtr (HWND hWnd, Type ptr, int n=GWLP_USERDATA)
template<>
bool DLSetWindowLongPtr (HWND hWnd, bool bo, int n)
WNDPROC DLSetWindowLongPtr (HWND hWnd, WNDPROC pfn)
WNDPROC DLSetWindowProc (HWND hWnd, WNDPROC pfn)
template<typename DataPtr>
DataPtr DLGetClassLongPtr (HWND hWnd, int n, DataPtr=NULL)
template<typename DataPtr>
DataPtr DLGetClassLongPtrA (HWND hWnd, int n)
template<typename DataPtr>
DataPtr DLGetClassLongPtrW (HWND hWnd, int n)
template<typename DataPtr>
DataPtr DLGetClassLongPtr (HWND hWnd, DataPtr *pPtr, int n)
template<>
bool DLGetClassLongPtr (HWND hWnd, int n, bool)
WNDPROC DLGetClassWindowProc (HWND hWnd)
WNDPROC DLGetClassWindowProcA (HWND hWnd)
WNDPROC DLGetClassWindowProcW (HWND hWnd)
template<typename Type>
Type DLSetClassLongPtr (HWND hWnd, Type ptr, int n)
template<>
bool DLSetClassLongPtr (HWND hWnd, bool bo, int n)
template<typename Type>
Type DLSetClassLongPtrA (HWND hWnd, Type ptr, int n)
template<typename Type>
Type DLSetClassLongPtrW (HWND hWnd, Type ptr, int n)
WNDPROC DLSetClassWindowProc (HWND hWnd, WNDPROC pfn)
WNDPROC DLSetClassWindowProcA (HWND hWnd, WNDPROC pfn)
WNDPROC DLSetClassWindowProcW (HWND hWnd, WNDPROC pfn)
UtilExport LONG DLRegSetString (HKEY key, const MCHAR *data, const MCHAR *name=NULL)
 Wrapper around the windows function RegSetValueEx.
UtilExport LONG DLRegSetDWord (HKEY key, DWORD data, const MCHAR *name=NULL)
 Wrapper around the windows function RegSetValueEx for DWORD data.
template<typename BlobType>
LONG DLRegSetBlob (HKEY key, const BlobType *lpbValue, DWORD n, LPCMSTR lpValueName=NULL)
UtilExport bool GetQtTextExtent (const MCHAR *text, SIZE &extent)
 Calculates the text extents using Qt.
UtilExport BOOL DLGetTextExtent (HDC hDC, const MCHAR *text, LPSIZE lpExtent, bool removeUIScaling=false, bool useQtTextWidth=true)
UtilExport BOOL DLGetTextExtent (HDC hDC, const MCHAR *text, size_t len, LPSIZE lpExtent, bool removeUIScaling=false, bool useQtTextWidth=true)
UtilExport BOOL DLTextOut (HDC hDC, int x, int y, const MCHAR *text)
UtilExport BOOL DLTextOut (HDC hDC, int x, int y, const MCHAR *text, size_t len)
UtilExport LONG DLTabbedTextOut (HDC hDC, int x, int y, const MCHAR *text, int nTabs, const INT *pTabPositions, int nTabOrigin)
UtilExport int DLDrawText (HDC hDC, const MCHAR *lpString, LPRECT lpRect, UINT uFormat)
UtilExport int DLDrawText (HDC hDC, const MCHAR *lpString, size_t len, LPRECT lpRect, UINT uFormat)
int DLGetSystemMetrics (int nIndex)
 Wrapper around the windows function GetSystemMetrics.
WORD PointerHiPart (ULONG_PTR ptr)
WORD PointerLoPart (ULONG_PTR ptr)
WORD PointerHiPart (LONG_PTR ptr)
WORD PointerLoPart (LONG_PTR ptr)
WORD PointerHiPart (void *ptr)
WORD PointerLoPart (void *ptr)
unsigned int fnv_32_buf (const void *buf, int len, unsigned int hval)
template<typename T>
unsigned int DLObjectHash (T &t, int HashTableSize=0)
unsigned int DLPointerHash (const void *pv, int HashTableSize=0)
int DL_abs (int n)
__int64 DL_abs (__int64 n)
float DL_abs (float f)
double DL_abs (double f)
long double DL_abs (long double f)

Macro Definition Documentation

◆ DL_STDEXT

#define DL_STDEXT   stdext

◆ DL_NON_RTTI_OBJECT

#define DL_NON_RTTI_OBJECT   std::__non_rtti_object

◆ DL_TYPENAME_OUTSIDE_TEMPLATE

#define DL_TYPENAME_OUTSIDE_TEMPLATE   typename

Typedef Documentation

◆ DL_NOTQUITE_WNDPROC

typedef INT_PTR(CALLBACK * DL_NOTQUITE_WNDPROC) (HWND, UINT, WPARAM, LPARAM)

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
FNV1_32_INIT 
FNV_32_PRIME 
464{
465 FNV1_32_INIT = 0x811c9dc5,
466 FNV_32_PRIME = 0x01000193
467};
@ FNV_32_PRIME
Definition 3dsmaxdlport.h:466
@ FNV1_32_INIT
Definition 3dsmaxdlport.h:465

Function Documentation

◆ DLGetWindowLongPtr() [1/3]

template<typename DataPtr>
DataPtr DLGetWindowLongPtr ( HWND hWnd,
int n = GWLP_USERDATA,
DataPtr = NULL )
48{
49 return (DataPtr)(static_cast<LONG_PTR>(::GetWindowLongPtr(hWnd, n)));
50}

◆ DLGetWindowLongPtrA()

template<typename DataPtr>
DataPtr DLGetWindowLongPtrA ( HWND hWnd,
int n = GWLP_USERDATA )
53{
54 return (DataPtr)(static_cast<LONG_PTR>(::GetWindowLongPtrA(hWnd, n)));
55}

◆ DLGetWindowLongPtrW()

template<typename DataPtr>
DataPtr DLGetWindowLongPtrW ( HWND hWnd,
int n = GWLP_USERDATA )
58{
59 return (DataPtr)(static_cast<LONG_PTR>(::GetWindowLongPtrW(hWnd, n)));
60}

◆ DLGetWindowLongPtr() [2/3]

template<typename DataPtr>
DataPtr DLGetWindowLongPtr ( HWND hWnd,
DataPtr * pPtr,
int n = GWLP_USERDATA )
63{
64 *pPtr = DLGetWindowLongPtr<DataPtr>(hWnd, n);
65
66 return *pPtr;
67}
DataPtr DLGetWindowLongPtr(HWND hWnd, int n=GWLP_USERDATA, DataPtr=NULL)
Definition 3dsmaxdlport.h:47

◆ DLGetWindowLongPtr() [3/3]

template<>
bool DLGetWindowLongPtr ( HWND hWnd,
int n,
bool  )
inline
70{
71 // Specialize for bool so we can quietly deal
72 // warning C4800: 'LONG_PTR' : forcing value to bool 'true' or 'false' (performance warning)
73 return ::GetWindowLongPtr(hWnd, n) != 0;
74}

◆ DLGetWindowProc()

WNDPROC DLGetWindowProc ( HWND hWnd)
inline
77{
78 return DLGetWindowLongPtr<WNDPROC>(hWnd, GWLP_WNDPROC);
79}

◆ DLGetWindowProcA()

WNDPROC DLGetWindowProcA ( HWND hWnd)
inline
82{
83 return DLGetWindowLongPtrA<WNDPROC>(hWnd, GWLP_WNDPROC);
84}
DataPtr DLGetWindowLongPtrA(HWND hWnd, int n=GWLP_USERDATA)
Definition 3dsmaxdlport.h:52

◆ DLGetWindowProcW()

WNDPROC DLGetWindowProcW ( HWND hWnd)
inline
87{
88 return DLGetWindowLongPtrW<WNDPROC>(hWnd, GWLP_WNDPROC);
89}
DataPtr DLGetWindowLongPtrW(HWND hWnd, int n=GWLP_USERDATA)
Definition 3dsmaxdlport.h:57

◆ DLGetWindowInstance()

HINSTANCE DLGetWindowInstance ( HWND hWnd)
inline
92{
93 return DLGetWindowLongPtr<HINSTANCE>(hWnd, GWLP_HINSTANCE);
94}

◆ DLSetWindowLongPtr() [1/3]

template<typename Type>
Type DLSetWindowLongPtr ( HWND hWnd,
Type ptr,
int n = GWLP_USERDATA )
inline
101{
102#if !defined( _WIN64 )
103 // SetWindowLongPtr() maps to SetWindowLong() in 32 bit land; react accordingly to keep
104 // the compiler happy, even with /Wp64.
105 return (Type)(static_cast<LONG_PTR>(::SetWindowLongPtr(hWnd, n, (LONG)((LONG_PTR)(ptr)))));
106#else
107 return (Type)(static_cast<LONG_PTR>(::SetWindowLongPtr(hWnd, n, (LONG_PTR)(ptr))));
108#endif
109}

◆ DLSetWindowLongPtr() [2/3]

template<>
bool DLSetWindowLongPtr ( HWND hWnd,
bool bo,
int n )
inline
112{
113 // Specialize for bool so we can quietly deal
114 // warning C4800: 'LONG_PTR' : forcing value to bool 'true' or 'false' (performance warning)
115 return ::SetWindowLongPtr(hWnd, n, bo) != 0;
116}

◆ DLSetWindowLongPtr() [3/3]

WNDPROC DLSetWindowLongPtr ( HWND hWnd,
WNDPROC pfn )
inline
119{
120 return DLSetWindowLongPtr<WNDPROC>(hWnd, pfn, GWLP_WNDPROC);
121}
Type DLSetWindowLongPtr(HWND hWnd, Type ptr, int n=GWLP_USERDATA)
Definition 3dsmaxdlport.h:100

◆ DLSetWindowProc()

WNDPROC DLSetWindowProc ( HWND hWnd,
WNDPROC pfn )
inline
124{
125 return DLSetWindowLongPtr<WNDPROC>(hWnd, pfn, GWLP_WNDPROC);
126}

◆ DLGetClassLongPtr() [1/3]

template<typename DataPtr>
DataPtr DLGetClassLongPtr ( HWND hWnd,
int n,
DataPtr = NULL )
137{
138 return (DataPtr)(static_cast<LONG_PTR>(::GetClassLongPtr(hWnd, n)));
139}

◆ DLGetClassLongPtrA()

template<typename DataPtr>
DataPtr DLGetClassLongPtrA ( HWND hWnd,
int n )
142{
143 return (DataPtr)(static_cast<LONG_PTR>(::GetClassLongPtrA(hWnd, n)));
144}

◆ DLGetClassLongPtrW()

template<typename DataPtr>
DataPtr DLGetClassLongPtrW ( HWND hWnd,
int n )
147{
148 return (DataPtr)(static_cast<LONG_PTR>(::GetClassLongPtrW(hWnd, n)));
149}

◆ DLGetClassLongPtr() [2/3]

template<typename DataPtr>
DataPtr DLGetClassLongPtr ( HWND hWnd,
DataPtr * pPtr,
int n )
152{
153 *pPtr = DLGetClassLongPtr<DataPtr>(hWnd, n);
154
155 return *pPtr;
156}
DataPtr DLGetClassLongPtr(HWND hWnd, int n, DataPtr=NULL)
Definition 3dsmaxdlport.h:136

◆ DLGetClassLongPtr() [3/3]

template<>
bool DLGetClassLongPtr ( HWND hWnd,
int n,
bool  )
inline
159{
160 return ::GetClassLongPtr(hWnd, n) != 0;
161}

◆ DLGetClassWindowProc()

WNDPROC DLGetClassWindowProc ( HWND hWnd)
inline
164{
165 return DLGetClassLongPtr<WNDPROC>(hWnd, GCLP_WNDPROC);
166}

◆ DLGetClassWindowProcA()

WNDPROC DLGetClassWindowProcA ( HWND hWnd)
inline
169{
170 return DLGetClassLongPtrA<WNDPROC>(hWnd, GCLP_WNDPROC);
171}
DataPtr DLGetClassLongPtrA(HWND hWnd, int n)
Definition 3dsmaxdlport.h:141

◆ DLGetClassWindowProcW()

WNDPROC DLGetClassWindowProcW ( HWND hWnd)
inline
174{
175 return DLGetClassLongPtrW<WNDPROC>(hWnd, GCLP_WNDPROC);
176}
DataPtr DLGetClassLongPtrW(HWND hWnd, int n)
Definition 3dsmaxdlport.h:146

◆ DLSetClassLongPtr() [1/2]

template<typename Type>
Type DLSetClassLongPtr ( HWND hWnd,
Type ptr,
int n )
inline
179{
180#if !defined( _WIN64 )
181 // SetClassLongPtr() maps to SetClassLong() in 32 bit land; react accordingly to keep
182 // the compiler happy, even with /Wp64.
183 return (Type)(static_cast<LONG_PTR>(::SetClassLongPtr(hWnd, n, (LONG)((LONG_PTR)(ptr)))));
184#else
185 return (Type)(static_cast<LONG_PTR>(::SetClassLongPtr(hWnd, n, (LONG_PTR)(ptr))));
186#endif
187}

◆ DLSetClassLongPtr() [2/2]

template<>
bool DLSetClassLongPtr ( HWND hWnd,
bool bo,
int n )
inline
190{
191 // Specialize for bool so we can quietly deal
192 // warning C4800: 'LONG_PTR' : forcing value to bool 'true' or 'false' (performance warning)
193 return ::SetClassLongPtr(hWnd, n, bo) != 0;
194}

◆ DLSetClassLongPtrA()

template<typename Type>
Type DLSetClassLongPtrA ( HWND hWnd,
Type ptr,
int n )
inline
197{
198#if !defined( _WIN64 )
199 // SetClassLongPtr() maps to SetClassLong() in 32 bit land; react accordingly to keep
200 // the compiler happy, even with /Wp64.
201 return (Type)(static_cast<LONG_PTR>(::SetClassLongPtrA(hWnd, n, (LONG)((LONG_PTR)(ptr)))));
202#else
203 return (Type)(static_cast<LONG_PTR>(::SetClassLongPtrA(hWnd, n, (LONG_PTR)(ptr))));
204#endif
205}

◆ DLSetClassLongPtrW()

template<typename Type>
Type DLSetClassLongPtrW ( HWND hWnd,
Type ptr,
int n )
inline
208{
209#if !defined( _WIN64 )
210 // SetClassLongPtr() maps to SetClassLong() in 32 bit land; react accordingly to keep
211 // the compiler happy, even with /Wp64.
212 return (Type)(static_cast<LONG_PTR>(::SetClassLongPtrW(hWnd, n, (LONG)((LONG_PTR)(ptr)))));
213#else
214 return (Type)(static_cast<LONG_PTR>(::SetClassLongPtrW(hWnd, n, (LONG_PTR)(ptr))));
215#endif
216}

◆ DLSetClassWindowProc()

WNDPROC DLSetClassWindowProc ( HWND hWnd,
WNDPROC pfn )
inline
219{
220 return DLSetClassLongPtr<WNDPROC>(hWnd, pfn, GCLP_WNDPROC);
221}
Type DLSetClassLongPtr(HWND hWnd, Type ptr, int n)
Definition 3dsmaxdlport.h:178

◆ DLSetClassWindowProcA()

WNDPROC DLSetClassWindowProcA ( HWND hWnd,
WNDPROC pfn )
inline
224{
225 return DLSetClassLongPtrA<WNDPROC>(hWnd, pfn, GCLP_WNDPROC);
226}
Type DLSetClassLongPtrA(HWND hWnd, Type ptr, int n)
Definition 3dsmaxdlport.h:196

◆ DLSetClassWindowProcW()

WNDPROC DLSetClassWindowProcW ( HWND hWnd,
WNDPROC pfn )
inline
229{
230 return DLSetClassLongPtrW<WNDPROC>(hWnd, pfn, GCLP_WNDPROC);
231}
Type DLSetClassLongPtrW(HWND hWnd, Type ptr, int n)
Definition 3dsmaxdlport.h:207

◆ DLRegSetString()

UtilExport LONG DLRegSetString ( HKEY key,
const MCHAR * data,
const MCHAR * name = NULL )

Wrapper around the windows function RegSetValueEx.

Parameters
key- The handle to an open registry key
data- The actual data to be added to the registry
name- The name of the registry key
HKEY query;
MSTR sub_key;
sub_key.printf(_T("Software\\Autodesk\\3dsMax\\%d.0"), MAX_VERSION_MAJOR);
LONG opened = ::RegOpenKeyEx(HKEY_CURRENT_USER, sub_key.data(), 0, KEY_ALL_ACCESS, &query);
if (opened != ERROR_SUCCESS)
return;
LONG result = DLRegSetString(query, _T("TestValue"), _T("TestKey"));
UtilExport LONG DLRegSetString(HKEY key, const MCHAR *data, const MCHAR *name=NULL)
Wrapper around the windows function RegSetValueEx.
const wchar_t * data() const
int printf(const wchar_t *format,...)
Write a formatted string into this WStr.
#define MAX_VERSION_MAJOR
Definition maxversion.h:25
WStr MSTR
Definition strclass.h:1130

◆ DLRegSetDWord()

UtilExport LONG DLRegSetDWord ( HKEY key,
DWORD data,
const MCHAR * name = NULL )

Wrapper around the windows function RegSetValueEx for DWORD data.

Parameters
key- The handle to an open registry key
data- The actual data to be added to the registry
name- The name of the registry key

◆ DLRegSetBlob()

template<typename BlobType>
LONG DLRegSetBlob ( HKEY key,
const BlobType * lpbValue,
DWORD n,
LPCMSTR lpValueName = NULL )
inline
288{
289 return ::RegSetValueEx(key, lpValueName, 0, REG_BINARY,
290 reinterpret_cast<LPBYTE>(const_cast<BlobType*>(lpbValue)),
291 n * sizeof(BlobType));
292}

◆ GetQtTextExtent()

UtilExport bool GetQtTextExtent ( const MCHAR * text,
SIZE & extent )

Calculates the text extents using Qt.

Parameters
[in]text- The text.
[out]extent- The text's extent as calculated via QFontMetricsF(qApp->font()).boundingRect({}, 0, text).
Returns
true if the text's extent was calculated (qApp exists, text not null).

◆ DLGetTextExtent() [1/2]

UtilExport BOOL DLGetTextExtent ( HDC hDC,
const MCHAR * text,
LPSIZE lpExtent,
bool removeUIScaling = false,
bool useQtTextWidth = true )

◆ DLGetTextExtent() [2/2]

UtilExport BOOL DLGetTextExtent ( HDC hDC,
const MCHAR * text,
size_t len,
LPSIZE lpExtent,
bool removeUIScaling = false,
bool useQtTextWidth = true )

◆ DLTextOut() [1/2]

UtilExport BOOL DLTextOut ( HDC hDC,
int x,
int y,
const MCHAR * text )

◆ DLTextOut() [2/2]

UtilExport BOOL DLTextOut ( HDC hDC,
int x,
int y,
const MCHAR * text,
size_t len )

◆ DLTabbedTextOut()

UtilExport LONG DLTabbedTextOut ( HDC hDC,
int x,
int y,
const MCHAR * text,
int nTabs,
const INT * pTabPositions,
int nTabOrigin )

◆ DLDrawText() [1/2]

UtilExport int DLDrawText ( HDC hDC,
const MCHAR * lpString,
LPRECT lpRect,
UINT uFormat )

◆ DLDrawText() [2/2]

UtilExport int DLDrawText ( HDC hDC,
const MCHAR * lpString,
size_t len,
LPRECT lpRect,
UINT uFormat )

◆ DLGetSystemMetrics()

int DLGetSystemMetrics ( int nIndex)
inline

Wrapper around the windows function GetSystemMetrics.

In Vista+ when running Aero, the value returned for SM_CXFRAME and SM_CYFRAME is incorrect in order to provide backwards compatibility with NT. To get the correct value, also need to add the value from SM_CXPADDEDBORDER. The implementation of this method automatically corrects the values returned for SM_CXFRAME and SM_CYFRAME. Note that SM_CXSIZEFRAME is the same index as SM_CXFRAME, and SM_CYSIZEFRAME as SM_CYFRAME;

Parameters
nIndex- The system metric or configuration setting to be retrieved.
332{
333 int res = GetSystemMetrics(nIndex);
334 static bool applyCorrection = true;
335 if ( applyCorrection && (nIndex == SM_CXFRAME || nIndex == SM_CYFRAME))
336 res += GetSystemMetrics(92); // SM_CXPADDEDBORDER == 92, defined only when _WIN32_WINNT >= 0x0600
337 return res;
338}

◆ PointerHiPart() [1/3]

WORD PointerHiPart ( ULONG_PTR ptr)
inline
382{
383 return static_cast<WORD>(ptr >> 16);
384}

◆ PointerLoPart() [1/3]

WORD PointerLoPart ( ULONG_PTR ptr)
inline
387{
388 return static_cast<WORD>(ptr);
389}

◆ PointerHiPart() [2/3]

WORD PointerHiPart ( LONG_PTR ptr)
inline
392{
393 return static_cast<WORD>((ptr >> 16) & 0xffff);
394}

◆ PointerLoPart() [2/3]

WORD PointerLoPart ( LONG_PTR ptr)
inline
397{
398 return static_cast<WORD>(ptr & 0xffff);
399}

◆ PointerHiPart() [3/3]

WORD PointerHiPart ( void * ptr)
inline
402{
403 return PointerHiPart(reinterpret_cast<ULONG_PTR>(ptr));
404}
WORD PointerHiPart(ULONG_PTR ptr)
Definition 3dsmaxdlport.h:381

◆ PointerLoPart() [3/3]

WORD PointerLoPart ( void * ptr)
inline
407{
408 return PointerLoPart(reinterpret_cast<ULONG_PTR>(ptr));
409}
WORD PointerLoPart(ULONG_PTR ptr)
Definition 3dsmaxdlport.h:386

◆ fnv_32_buf()

unsigned int fnv_32_buf ( const void * buf,
int len,
unsigned int hval )
inline
488{
489 const unsigned char *bp = (const unsigned char *)buf; /* start of buffer */
490 const unsigned char *be = bp + len; /* beyond end of buffer */
491
492 /*
493 * FNV-1 hash each octet in the buffer
494 */
495 while (bp < be)
496 {
497 /* multiply by the 32 bit FNV magic prime mod 2^32 */
498 hval *= FNV_32_PRIME;
499
500 /* xor the bottom with the current octet */
501 hval ^= (unsigned int)*bp++;
502 }
503
504 /* return our new hash value */
505 return hval;
506}
MAXMEM_EXTERN_C UtilExport int(__cdecl *MAX_heapchk)(void)

◆ DLObjectHash()

template<typename T>
unsigned int DLObjectHash ( T & t,
int HashTableSize = 0 )
inline
510{
511 // Since we're always hashing single objects, we hash using the 'init value';
512 // we'd have to carry it over if we were hashing all fields in a structure, for
513 // instance.
514 // You should never never never never attempt to hash a structure by passing its
515 // pointer, since you'd end up hashing the padding bytes as well, which are definitely
516 // not going to be preserved.
517 unsigned int hash = fnv_32_buf(&t, sizeof(t), (unsigned int)FNV1_32_INIT);
518
519 return HashTableSize ? hash % HashTableSize : hash;
520}
unsigned int fnv_32_buf(const void *buf, int len, unsigned int hval)
Definition 3dsmaxdlport.h:487

◆ DLPointerHash()

unsigned int DLPointerHash ( const void * pv,
int HashTableSize = 0 )
inline
523{
524 return DLObjectHash(pv, HashTableSize);
525}
unsigned int DLObjectHash(T &t, int HashTableSize=0)
Definition 3dsmaxdlport.h:509

◆ DL_abs() [1/5]

int DL_abs ( int n)
inline
534{ return std::abs(n); }

◆ DL_abs() [2/5]

__int64 DL_abs ( __int64 n)
inline
535{ return (n < 0) ? -n : n; }

◆ DL_abs() [3/5]

float DL_abs ( float f)
inline
537{ return std::fabsf(f); }

◆ DL_abs() [4/5]

double DL_abs ( double f)
inline
538{ return std::fabs(f); }

◆ DL_abs() [5/5]

long double DL_abs ( long double f)
inline
539{ return std::fabsl(f); }