3ds Max C++ API Reference
ipoint3.h File Reference
#include "GeomExport.h"
#include <cassert>
#include <cmath>
#include <iosfwd>

Classes

class  IPoint3
 

Functions

int MaxComponent (const IPoint3 &p)
 
int MinComponent (const IPoint3 &p)
 
float Length (const IPoint3 &p)
 
constexpr int LengthSquared (const IPoint3 &p)
 
constexpr int DotProd (const IPoint3 &a, const IPoint3 &b)
 
constexpr IPoint3 CrossProd (const IPoint3 &a, const IPoint3 &b)
 
constexpr IPoint3 operator* (const IPoint3 &p, int f)
 
constexpr IPoint3 operator* (int f, const IPoint3 &p)
 
constexpr IPoint3 operator+ (const IPoint3 &p, int f)
 
constexpr IPoint3 operator+ (int f, const IPoint3 &p)
 
constexpr IPoint3 operator- (const IPoint3 &p, int f)
 
IPoint3 operator/ (const IPoint3 &p, int f)
 

Function Documentation

◆ MaxComponent()

int MaxComponent ( const IPoint3 p)
inline
Remarks
Returns the component with the maximum abs value. 0=x, 1=y, 2=z.
234 {
235  return p.MaxComponent();
236 }
int MaxComponent() const

◆ MinComponent()

int MinComponent ( const IPoint3 p)
inline
Remarks
Returns the component with the minimum abs value. 0=x, 1=y, 2=z.
239 {
240  return p.MinComponent();
241 }
int MinComponent() const

◆ Length()

float Length ( const IPoint3 p)
inline
Remarks
Returns the length of the IPoint3
245 {
246  return p.Length();
247 }
float Length() const
Definition: ipoint3.h:99

◆ LengthSquared()

constexpr int LengthSquared ( const IPoint3 p)
constexpr
Remarks
Returns the length squared of the IPoint3
250 {
251  return p.LengthSquared();
252 }
constexpr int LengthSquared() const
Definition: ipoint3.h:94

◆ DotProd()

constexpr int DotProd ( const IPoint3 a,
const IPoint3 b 
)
constexpr
Remarks
Returns dot product of two IPoint3
256 {
257  return a % b;
258 }

◆ CrossProd()

constexpr IPoint3 CrossProd ( const IPoint3 a,
const IPoint3 b 
)
constexpr
Remarks
Returns cross product of two IPoint3
262 {
263  return a ^ b;
264 }

◆ operator*() [1/2]

constexpr IPoint3 operator* ( const IPoint3 p,
int  f 
)
constexpr
Remarks
Returns an IPoint3 multiplied by a scalar.
268 {
269  return IPoint3(p.x * f, p.y * f, p.z * f);
270 }
Definition: ipoint3.h:29
int y
Definition: ipoint3.h:32
int z
Definition: ipoint3.h:33
int x
Definition: ipoint3.h:31

◆ operator*() [2/2]

constexpr IPoint3 operator* ( int  f,
const IPoint3 p 
)
constexpr
272 {
273  return p * f;
274 }

◆ operator+() [1/2]

constexpr IPoint3 operator+ ( const IPoint3 p,
int  f 
)
constexpr
Remarks
Returns an IPoint3 offset by (f,f,f).
278 {
279  return IPoint3(p.x + f, p.y + f, p.z + f);
280 }

◆ operator+() [2/2]

constexpr IPoint3 operator+ ( int  f,
const IPoint3 p 
)
constexpr
282 {
283  return p + f;
284 }

◆ operator-()

constexpr IPoint3 operator- ( const IPoint3 p,
int  f 
)
constexpr
Remarks
Returns an IPoint3 offset by (-f,-f,-f).
288 {
289  return p + -f;
290 }

◆ operator/()

IPoint3 operator/ ( const IPoint3 p,
int  f 
)
inline
Remarks
Returns an IPoint3 whose members are divided by a scalar.
294 {
295  assert(f != 0);
296  return IPoint3(p.x / f, p.y / f, p.z / f);
297 }
#define assert(expr)
Definition: assert1.h:81