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

Classes

class  DPoint3
 class DPoint3 Description: This class describes a 3D point using double precision x, y and z coordinates. More...
 
class  DRay
 

Functions

int MaxComponent (const DPoint3 &p)
 
int MinComponent (const DPoint3 &p)
 
double Length (const DPoint3 &p)
 
constexpr double LengthSquared (const DPoint3 &p)
 
constexpr double DotProd (const DPoint3 &a, const DPoint3 &b)
 
constexpr DPoint3 CrossProd (const DPoint3 &a, const DPoint3 &b)
 
constexpr DPoint3 operator* (const DPoint3 &p, double f)
 
constexpr DPoint3 operator* (double f, const DPoint3 &p)
 
constexpr DPoint3 operator+ (const DPoint3 &p, double f)
 
constexpr DPoint3 operator+ (double f, const DPoint3 &p)
 
constexpr DPoint3 operator- (const DPoint3 &p, double f)
 
DPoint3 operator/ (const DPoint3 &p, double f)
 
DPoint3 Normalize (const DPoint3 &p)
 
constexpr Point3 Point3FromDPoint3 (const DPoint3 &from)
 

Function Documentation

◆ MaxComponent()

int MaxComponent ( const DPoint3 p)
inline
Remarks
Returns the component with the maximum abs value. 0=x, 1=y, 2=z.
253{
254 return p.MaxComponent();
255}
int MaxComponent() const

◆ MinComponent()

int MinComponent ( const DPoint3 p)
inline
Remarks
Returns the component with the minimum abs value. 0=x, 1=y, 2=z.
258{
259 return p.MinComponent();
260}
int MinComponent() const

◆ Length()

double Length ( const DPoint3 p)
inline
Remarks
Returns the length of the DPoint3
264{
265 return p.Length();
266}
double Length() const
Returns the 'Length' of this point (vector)
Definition: dpoint3.h:196

◆ LengthSquared()

constexpr double LengthSquared ( const DPoint3 p)
constexpr
Remarks
Returns the length squared of the DPoint3
269{
270 return p.LengthSquared();
271}
constexpr double LengthSquared() const
The 'Length' squared of this point.
Definition: dpoint3.h:191

◆ DotProd()

constexpr double DotProd ( const DPoint3 a,
const DPoint3 b 
)
constexpr
Remarks
Returns dot product of two DPoint3
275{
276 return a % b;
277}
float float b
Definition: texutil.h:51
float a
Definition: texutil.h:51

◆ CrossProd()

constexpr DPoint3 CrossProd ( const DPoint3 a,
const DPoint3 b 
)
constexpr
Remarks
Returns cross product of two DPoint3
281{
282 return a ^ b;
283}

◆ operator*() [1/2]

constexpr DPoint3 operator* ( const DPoint3 p,
double  f 
)
constexpr
Remarks
Returns a DPoint3 multiplied by a scalar.
287{
288 return DPoint3(p.x * f, p.y * f, p.z * f);
289}
class DPoint3 Description: This class describes a 3D point using double precision x,...
Definition: dpoint3.h:25
double z
Definition: dpoint3.h:29
double y
Definition: dpoint3.h:28
double x
Definition: dpoint3.h:27

◆ operator*() [2/2]

constexpr DPoint3 operator* ( double  f,
const DPoint3 p 
)
constexpr
291{
292 return p * f;
293}

◆ operator+() [1/2]

constexpr DPoint3 operator+ ( const DPoint3 p,
double  f 
)
constexpr
Remarks
Returns a DPoint3 offset by (f,f,f).
297{
298 return DPoint3(p.x + f, p.y + f, p.z + f);
299}

◆ operator+() [2/2]

constexpr DPoint3 operator+ ( double  f,
const DPoint3 p 
)
constexpr
301{
302 return p + f;
303}

◆ operator-()

constexpr DPoint3 operator- ( const DPoint3 p,
double  f 
)
constexpr
Remarks
Returns a DPoint3 offset by (-f,-f,-f).
307{
308 return p + -f;
309}

◆ operator/()

DPoint3 operator/ ( const DPoint3 p,
double  f 
)
inline
Remarks
Returns a DPoint3 whose members are divided by a scalar.
313{
314 assert(f != 0.0);
315 return p * (1.0 / f);
316}
#define assert(expr)
Definition: assert1.h:82

◆ Normalize()

DPoint3 Normalize ( const DPoint3 p)
inline
Remarks
Normalizes p using double precision
320{
321 return p.Normalize();
322}
DPoint3 Normalize() const
Returns unit vector in the same direction as this point.

◆ Point3FromDPoint3()

constexpr Point3 Point3FromDPoint3 ( const DPoint3 from)
constexpr
326{
327 return Point3(from.x, from.y, from.z);
328}
Definition: point3.h:54