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

Classes

class  Point3
 
class  Ray
 

Typedefs

typedef Point3 UVVert
 
typedef Point3 VertColor
 

Functions

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

Typedef Documentation

◆ UVVert

typedef Point3 UVVert

◆ VertColor

typedef Point3 VertColor

Function Documentation

◆ MaxComponent()

int MaxComponent ( const Point3 p)
inline
Remarks
Returns the component with the maximum abs value. 0=x, 1=y, 2=z.
305{
306 return p.MaxComponent();
307}
int MaxComponent() const

◆ MinComponent()

int MinComponent ( const Point3 p)
inline
Remarks
Returns the component with the minimum abs value. 0=x, 1=y, 2=z.
310{
311 return p.MinComponent();
312}
int MinComponent() const

◆ Length()

float Length ( const Point3 p)
inline
Remarks
Returns the length of the Point3
316{
317 return p.Length();
318}
float Length() const
Definition: point3.h:140

◆ FLength()

float FLength ( const Point3 p)
inline
Remarks
Returns the length of the Point3
321{
322 return p.FLength();
323}
float FLength() const
Definition: point3.h:145

◆ LengthSquared()

constexpr float LengthSquared ( const Point3 p)
constexpr
Remarks
Returns the length squared of the Point3
326{
327 return p.LengthSquared();
328}
constexpr float LengthSquared() const
Definition: point3.h:135

◆ DotProd()

constexpr float DotProd ( const Point3 a,
const Point3 b 
)
constexpr
Remarks
Returns dot product of two Point3
332{
333 return a % b;
334}
float float b
Definition: texutil.h:51
float a
Definition: texutil.h:51

◆ CrossProd()

constexpr Point3 CrossProd ( const Point3 a,
const Point3 b 
)
constexpr
Remarks
Returns cross product of two Point3
338{
339 return a ^ b;
340}

◆ operator*() [1/2]

constexpr Point3 operator* ( const Point3 p,
float  f 
)
constexpr
Remarks
Returns an Point3 multiplied by a scalar.
344{
345 return Point3(p.x * f, p.y * f, p.z * f);
346}
Definition: point3.h:54
float y
Definition: point3.h:57
float x
Definition: point3.h:56
float z
Definition: point3.h:58

◆ operator*() [2/2]

constexpr Point3 operator* ( float  f,
const Point3 p 
)
constexpr
348{
349 return p * f;
350}

◆ operator+() [1/2]

constexpr Point3 operator+ ( const Point3 p,
float  f 
)
constexpr
Remarks
Returns an Point3 offset by (f,f,f).
354{
355 return Point3(p.x + f, p.y + f, p.z + f);
356}

◆ operator+() [2/2]

constexpr Point3 operator+ ( float  f,
const Point3 p 
)
constexpr
358{
359 return p + f;
360}

◆ operator-()

constexpr Point3 operator- ( const Point3 p,
float  f 
)
constexpr
Remarks
Returns an Point3 offset by (-f,-f,-f).
364{
365 return p + -f;
366}

◆ operator/()

Point3 operator/ ( const Point3 p,
float  f 
)
inline
Remarks
Returns an Point3 whose members are divided by a scalar.
370{
371 assert(f != 0.f);
372 return p * (1.f / f);
373}
#define assert(expr)
Definition: assert1.h:82

◆ FNormalize()

Point3 FNormalize ( const Point3 p)
inline
Remarks
Normalizes p using float precision
377{
378 return p.FNormalize();
379}
Point3 FNormalize() const

◆ Normalize()

Point3 Normalize ( const Point3 p)
inline
Remarks
Normalizes p using double precision
382{
383 return p.Normalize();
384}
Point3 Normalize() const