3ds Max C++ API Reference
dpoint3.h File Reference
#include "GeomExport.h"
#include "maxheap.h"
#include "point3.h"
#include "assert1.h"
#include <iosfwd>

Classes

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

Functions

double Length (const DPoint3 &)
 Returns the 'Length' of the point. More...
 
int MaxComponent (const DPoint3 &)
 Returns the component with the maximum absolute value. More...
 
int MinComponent (const DPoint3 &)
 Returns the component with the minimum absolute value. More...
 
DPoint3 Normalize (const DPoint3 &)
 Returns a unit vector. More...
 
DPoint3 operator* (double, const DPoint3 &)
 
DPoint3 operator* (const DPoint3 &, double)
 
DPoint3 operator/ (const DPoint3 &, double)
 
std::ostream & operator<< (std::ostream &, const DPoint3 &)
 
Point3 Point3FromDPoint3 (const DPoint3 &from)
 
DPoint3 CrossProd (const DPoint3 &a, const DPoint3 &b)
 Returns the cross product of two DPoint3s. More...
 
double DotProd (const DPoint3 &a, const DPoint3 &b)
 Returns the dot product of two DPoint3s. More...
 

Function Documentation

◆ Length()

double Length ( const DPoint3 v)
inline

Returns the 'Length' of the point.

This is sqrt(v.x*v.x+v.y*v.y+v.z*v.z)

200 {
201  return (double)sqrt(v.x * v.x + v.y * v.y + v.z * v.z);
202 }
double z
Definition: dpoint3.h:29
double y
Definition: dpoint3.h:28
double x
Definition: dpoint3.h:27

◆ MaxComponent()

int MaxComponent ( const DPoint3 )

Returns the component with the maximum absolute value.

0=x, 1=y, 2=z.

◆ MinComponent()

int MinComponent ( const DPoint3 )

Returns the component with the minimum absolute value.

0=x, 1=y, 2=z.

◆ Normalize()

DPoint3 Normalize ( const DPoint3 )

Returns a unit vector.

This is a DPoint3 with each component divided by the point Length().

◆ operator*() [1/2]

DPoint3 operator* ( double  f,
const DPoint3 a 
)
inline
262 {
263  return (DPoint3(a.x * f, a.y * f, a.z * f));
264 }
class DPoint3 Description: This class describes a 3D point using double precision x,...
Definition: dpoint3.h:25

◆ operator*() [2/2]

DPoint3 operator* ( const DPoint3 a,
double  f 
)
inline
267 {
268  return (DPoint3(a.x * f, a.y * f, a.z * f));
269 }

◆ operator/()

DPoint3 operator/ ( const DPoint3 a,
double  f 
)
inline
272 {
273  DbgAssert(f != 0.0);
274  double invF = 1.0 / f; // Mimic 2019 behavior
275  return (DPoint3(a.x * invF, a.y * invF, a.z * invF));
276 }
#define DbgAssert(expr)
Definition: assert1.h:82

◆ operator<<()

std::ostream& operator<< ( std::ostream &  ,
const DPoint3  
)

◆ Point3FromDPoint3()

Point3 Point3FromDPoint3 ( const DPoint3 from)
inline
280 {
281  return Point3(from.x, from.y, from.z);
282 }
Definition: point3.h:56

◆ CrossProd()

DPoint3 CrossProd ( const DPoint3 a,
const DPoint3 b 
)

Returns the cross product of two DPoint3s.

◆ DotProd()

double DotProd ( const DPoint3 a,
const DPoint3 b 
)

Returns the dot product of two DPoint3s.