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

Classes

struct  Color24
 8 bits for each of the Red, Green and Blue components. More...
 
struct  Color48
 16 bits for each of the Red, Green and Blue components. More...
 
struct  Color64
 16 bits for each of the Red, Green, Blue, and Alpha components. More...
 
struct  BMM_Color_24
 24 bit color: 8 bits each for Red, Green, and Blue. More...
 
struct  BMM_Color_32
 32 bit color: 8 bits each for Red, Green, Blue, and Alpha. More...
 
struct  BMM_Color_48
 48 bit color: 16 bits each for Red, Green, and Blue. More...
 
struct  BMM_Color_64
 64 bit color: 16 bits each for Red, Green, Blue, and Alpha. More...
 
struct  BMM_Color_fl
 High Dynamic Range bitmaps make use of this class to store color information using floating point values. More...
 
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 { 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 
298 {
299  NEW_CHUNK = 0,
300  CONTAINER_CHUNK = 1,
301  DATA_CHUNK = 2
302 };
@ CONTAINER_CHUNK
Definition: maxtypes.h:300
@ NEW_CHUNK
Definition: maxtypes.h:299
@ DATA_CHUNK
Definition: maxtypes.h:301

◆ 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

305 {
308  IOTYPE_MAX = 0,
311  IOTYPE_MATLIB = 1,
315 };
@ IOTYPE_RENDER_PRESETS
File IO concerns a render preset file (.rps).
Definition: maxtypes.h:314
@ IOTYPE_MATLIB
File IO concerns a material library file (.mat).
Definition: maxtypes.h:311
@ IOTYPE_MAX
File IO concerns a scene file (.max, .viz).
Definition: maxtypes.h:308

Function Documentation

◆ TicksToSec()

constexpr float TicksToSec ( TimeValue  ticks)
constexpr

Converts from ticks to seconds.

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

◆ SecToTicks()

constexpr TimeValue SecToTicks ( double  secs)
constexpr

Converts from seconds to ticks.

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

◆ TicksSecToTime()

constexpr TimeValue TicksSecToTime ( TimeValue  ticks,
double  secs 
)
constexpr

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

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

◆ TimeToTicksSec()

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

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


129 {
130  ticks = time % TIME_TICKSPERSEC;
131  secs = time / TIME_TICKSPERSEC;
132 }