3ds Max C++ API Reference
Loading...
Searching...
No Matches
ipoint2.h File Reference
#include "GeomExport.h"
#include <cassert>
#include <cmath>
#include <iosfwd>

Classes

class  IPoint2
 

Functions

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

Function Documentation

◆ MaxComponent()

int MaxComponent ( const IPoint2 p)
inline
Remarks
Returns the component with the maximum abs value. 0=x, 1=y.
217{
218 return p.MaxComponent();
219}
int MaxComponent() const

◆ MinComponent()

int MinComponent ( const IPoint2 p)
inline
Remarks
Returns the component with the minimum abs value. 0=x, 1=y.
222{
223 return p.MinComponent();
224}
int MinComponent() const

◆ Length()

float Length ( const IPoint2 p)
inline
Remarks
Returns the length of the IPoint2
228{
229 return p.Length();
230}
float Length() const
Definition: ipoint2.h:94

◆ LengthSquared()

constexpr int LengthSquared ( const IPoint2 p)
constexpr
Remarks
Returns the length squared of the IPoint2
233{
234 return p.LengthSquared();
235}
constexpr int LengthSquared() const
Definition: ipoint2.h:88

◆ DotProd()

constexpr int DotProd ( const IPoint2 a,
const IPoint2 b 
)
constexpr
Remarks
Returns dot product of two IPoint2
239{
240 return a % b;
241}
float float b
Definition: texutil.h:51
float a
Definition: texutil.h:51

◆ operator*() [1/2]

constexpr IPoint2 operator* ( const IPoint2 a,
int  f 
)
constexpr
Remarks
Returns an IPoint2 multiplied by a scalar.
245{
246 return IPoint2(a.x * f, a.y * f);
247}
Definition: ipoint2.h:30

◆ operator*() [2/2]

constexpr IPoint2 operator* ( int  f,
const IPoint2 a 
)
constexpr
249{
250 return a * f;
251}

◆ operator+() [1/2]

constexpr IPoint2 operator+ ( const IPoint2 a,
int  f 
)
constexpr
Remarks
Returns an IPoint2 offset by (f,f).
255{
256 return IPoint2(a.x + f, a.y + f);
257}

◆ operator+() [2/2]

constexpr IPoint2 operator+ ( int  f,
const IPoint2 a 
)
constexpr
259{
260 return a + f;
261}

◆ operator-()

constexpr IPoint2 operator- ( const IPoint2 a,
int  f 
)
constexpr
Remarks
Returns an IPoint2 offset by (-f,-f).
265{
266 return a + -f;
267}

◆ operator/()

constexpr IPoint2 operator/ ( const IPoint2 a,
int  f 
)
constexpr
Remarks
Returns an IPoint2 whose x and y members are divided by a scalar.
271{
272 return IPoint2(a.x / f, a.y / f);
273}