3ds Max C++ API Reference
maxtypes.h File Reference
#include "maxheap.h"
#include "WindowsDefines.h"
#include "geom/maxcolors.h"
#include <cstdint>

Classes

class  Class_ID
 
class  Interface_ID
 

Macros

#define TIME_TICKSPERSEC   4800
 Number of ticks in a second. More...
 
#define TIME_PosInfinity   TimeValue(0x7fffffff)
 Returns a time value that represents positive infinity. More...
 
#define TIME_NegInfinity   TimeValue(0x80000000)
 Returns a time value that represents negative infinity. More...
 

Typedefs

using ulong = unsigned long
 
using uchar = unsigned char
 
using UBYTE = uchar
 
using UWORD = unsigned short
 
using MtlID = UWORD
 
using TimeValue = int
 
using SClass_ID = ulong
 

Enumerations

enum  IOResult : int { IO_OK = 0 , IO_END = 1 , IO_ERROR = 2 , IO_INTERRUPT = 3 }
 
enum  ChunkType { NEW_CHUNK = 0 , CONTAINER_CHUNK = 1 , DATA_CHUNK = 2 }
 
enum  FileIOType { IOTYPE_MAX = 0 , IOTYPE_MATLIB = 1 , IOTYPE_RENDER_PRESETS = 2 }
 

Functions

constexpr float TicksToSec (TimeValue ticks)
 Converts from ticks to seconds. More...
 
constexpr TimeValue SecToTicks (double secs)
 Converts from seconds to ticks. More...
 
constexpr TimeValue TicksSecToTime (TimeValue ticks, double secs)
 Converts a number of seconds plus a number of ticks to a TimeValue. More...
 
constexpr void TimeToTicksSec (TimeValue time, TimeValue &ticks, TimeValue &secs)
 Converts a TimeValue to a number of seconds plus a number of ticks. More...
 

Macro Definition Documentation

◆ TIME_TICKSPERSEC

#define TIME_TICKSPERSEC   4800

Number of ticks in a second.

◆ TIME_PosInfinity

#define TIME_PosInfinity   TimeValue(0x7fffffff)

Returns a time value that represents positive infinity.

◆ TIME_NegInfinity

#define TIME_NegInfinity   TimeValue(0x80000000)

Returns a time value that represents negative infinity.

Typedef Documentation

◆ ulong

using ulong = unsigned long

◆ uchar

using uchar = unsigned char

◆ UBYTE

using UBYTE = uchar

◆ UWORD

using UWORD = unsigned short

◆ MtlID

using MtlID = UWORD

◆ TimeValue

using TimeValue = int

◆ SClass_ID

using SClass_ID = ulong

Enumeration Type Documentation

◆ ChunkType

enum ChunkType
Enumerator
NEW_CHUNK 
CONTAINER_CHUNK 
DATA_CHUNK 
211 {
212  NEW_CHUNK = 0,
213  CONTAINER_CHUNK = 1,
214  DATA_CHUNK = 2
215 };
@ CONTAINER_CHUNK
Definition: maxtypes.h:213
@ NEW_CHUNK
Definition: maxtypes.h:212
@ DATA_CHUNK
Definition: maxtypes.h:214

◆ FileIOType

enum FileIOType
Enumerator
IOTYPE_MAX 

File IO concerns a scene file (.max, .viz).

See NOTIFY_FILE_PRE_OPEN, NOTIFY_FILE_POST_OPEN

IOTYPE_MATLIB 

File IO concerns a material library file (.mat).

See NOTIFY_FILE_PRE_OPEN, NOTIFY_FILE_POST_OPEN

IOTYPE_RENDER_PRESETS 

File IO concerns a render preset file (.rps).

See NOTIFY_FILE_PRE_OPEN, NOTIFY_FILE_POST_OPEN

218 {
221  IOTYPE_MAX = 0,
224  IOTYPE_MATLIB = 1,
228 };
@ IOTYPE_RENDER_PRESETS
File IO concerns a render preset file (.rps).
Definition: maxtypes.h:227
@ IOTYPE_MATLIB
File IO concerns a material library file (.mat).
Definition: maxtypes.h:224
@ IOTYPE_MAX
File IO concerns a scene file (.max, .viz).
Definition: maxtypes.h:221

Function Documentation

◆ TicksToSec()

constexpr float TicksToSec ( TimeValue  ticks)
constexpr

Converts from ticks to seconds.

35 { return ticks / static_cast<float>(TIME_TICKSPERSEC); }
#define TIME_TICKSPERSEC
Number of ticks in a second.
Definition: maxtypes.h:33

◆ SecToTicks()

constexpr TimeValue SecToTicks ( double  secs)
constexpr

Converts from seconds to ticks.

37 { return static_cast<TimeValue>(secs * TIME_TICKSPERSEC); }
int TimeValue
Definition: maxtypes.h:31

◆ TicksSecToTime()

constexpr TimeValue TicksSecToTime ( TimeValue  ticks,
double  secs 
)
constexpr

Converts a number of seconds plus a number of ticks to a TimeValue.

39 { return ticks + SecToTicks(secs); }
constexpr TimeValue SecToTicks(double secs)
Converts from seconds to ticks.
Definition: maxtypes.h:37

◆ TimeToTicksSec()

constexpr void TimeToTicksSec ( TimeValue  time,
TimeValue ticks,
TimeValue secs 
)
constexpr

Converts a TimeValue to a number of seconds plus a number of ticks.


42 {
43  ticks = time % TIME_TICKSPERSEC;
44  secs = time / TIME_TICKSPERSEC;
45 }