This reference page is linked to from the following overview
topics: Matrix
Fundamentals, Translation
(Moving), Rotation,
Lesson 5:
Geometric Objects, Lesson 4:
Animation Controllers, Rotation
Concepts, Scaling,
Lesson 6:
Parameter Blocks, A Matrix3
as an Axis System, 3DXI
Mesh, Object
Offset Transformation, New
Classes and Methods, Using the
Node and Object Offset Transformations, Emulating
Reset Transform and Reset Scale, 3DXI
Animation Keys, Creating a
Patch, Creating a
Spline, Patch
Interpolator Example, Ring Array
Slave and Master Controllers, Creating
Primitive NURBS Objects, Ring Array
Creation Process, Parameter
Types, Principal
Classes for Materials and Textures, Using the
API to Create and Modify 3ds Max NURBS Models, Mixin
Interfaces, Parameter
Tags, Publishing
Mixin Interface on Arbitrary Classes, Parameter
UI Control Types, Property
Accessors, Passing
FPInterfaces as Parameters and Results, Spinner
and Slider Control Types, Controllers,
Added Base
Types, Getting
and Setting Parameter Block Values, Keyframe
Data Access Classes and Methods, IK
Concepts, Declaring
the UI Variables, Procedural
Controller Data Access, Face-Mapped
Materials, Computing
Face Normals, Using
setHitCode and setHitDistance, Computing
Vertex Normals, Bump
Mapping, Main
Physique Export API Elements, Handling
Mouse Procedures, Tips and
Tricks, Computing
Vertex Normals by Weighting, Texture
Coordinates, Vertex
Color Information, Autodesk.Max.dll,
Using the
Physique Export Interface.
#include <point3.h>
Class Description
- See also:
- Class IPoint3,
Class DPoint3, Class Matrix3.
- Description:
- This class describes a 3D point using float x, y and z
coordinates. Methods are provided to add and subtract points,
multiply and divide by scalars, and element by element multiply and
divide two points.
This class is also frequently used to simply store three floating
point values that may not represent a point. For example, a color
value where x=red, y=green, and z=blue. For color, the range of
values is 0.0 to 1.0, where 0 is 0 and 1.0 is 255. All methods are
implemented by the system.
Note: In 3ds Max, all vectors are assumed to be row vectors. Under
this assumption, multiplication of a vector with a matrix can be
written either way (Matrix*Vector or Vector*Matrix), for ease of
use, and the result is the same -- the (row) vector transformed by
the matrix.
- Data Members:
- float x, y, z;
The x, y and z components of the point.
static const Point3
Origin;
This data member is available in release 3.0 and later only.
This is equivalent to Point3(0.0f, 0.0f, 0.0f);
static const Point3
XAxis;
This data member is available in release 3.0 and later only.
This is equivalent to Point3(1.0f, 0.0f, 0.0f);
static const Point3
YAxis;
This data member is available in release 3.0 and later only.
This is equivalent to Point3(0.0f, 1.0f, 0.0f);
static const Point3
ZAxis;
This data member is available in release 3.0 and later only.
This is equivalent to Point3(0.0f, 0.0f, 1.0f);
Constructor & Destructor Documentation
Point3 |
( |
float |
X, |
|
|
float |
Y, |
|
|
float |
Z |
|
) |
|
[inline] |
Point3 |
( |
double |
X, |
|
|
double |
Y, |
|
|
double |
Z |
|
) |
|
[inline] |
{
x = (float)X; y = (float)Y; z = (float)Z;
}
Point3 |
( |
int |
X, |
|
|
int |
Y, |
|
|
int |
Z |
|
) |
|
[inline] |
{
x = (float)X; y = (float)Y; z = (float)Z;
}
{
x = a.x; y = a.y; z = a.z;
}
Point3 |
( |
float |
af[3] |
) |
[inline] |
{
x = af[0]; y = af[1]; z = af[2];
}
Member Function Documentation
float& operator[] |
( |
int |
i |
) |
[inline] |
- Returns:
- An value for i of 0 will return x, 1 will return y, 2
will return z.
const float& operator[] |
( |
int |
i |
) |
const [inline] |
- Returns:
- An value for i of 0 will return x, 1 will return y, 2
will return z.
operator float * |
( |
|
) |
[inline] |
Point3 operator- |
( |
|
) |
const [inline] |
Point3 operator+ |
( |
|
) |
const [inline] |
float Length |
( |
|
) |
const [inline] |
{
return (float)sqrt(x*x+y*y+z*z);
}
float FLength |
( |
|
) |
const [inline] |
__forceinline float LengthSquared |
( |
|
) |
const |
int MaxComponent |
( |
|
) |
const |
int MinComponent |
( |
|
) |
const |
__forceinline Point3 & operator-= |
( |
const Point3 & |
a |
) |
[inline] |
{
x -= a.x; y -= a.y; z -= a.z;
return *this;
}
__forceinline Point3 & operator+= |
( |
const Point3 & |
a |
) |
[inline] |
{
x += a.x; y += a.y; z += a.z;
return *this;
}
__forceinline Point3 & operator*= |
( |
float |
f |
) |
[inline] |
{
x *= f; y *= f; z *= f;
return *this;
}
__forceinline Point3 & operator/= |
( |
float |
f |
) |
[inline] |
{
x /= f; y /= f; z /= f;
return *this;
}
__forceinline Point3 & operator*= |
( |
const Point3 & |
a |
) |
[inline] |
{
x *= a.x; y *= a.y; z *= a.z;
return *this;
}
__forceinline Point3 & Set |
( |
float |
X, |
|
|
float |
Y, |
|
|
float |
Z |
|
) |
|
[inline] |
{
x = X;
y = Y;
z = Z;
return *this;
}
int operator== |
( |
const Point3 & |
p |
) |
const [inline] |
- Returns:
- Nonzero if the Point3's are equal; otherwise 0.
{
return ((p.x==x)&&(p.y==y)&&(p.z==z));
}
int operator!= |
( |
const Point3 & |
p |
) |
const [inline] |
{
return ((p.x!=x)||(p.y!=y)||(p.z!=z));
}
int Equals |
( |
const Point3 & |
p, |
|
|
float |
epsilon =
1E-6f |
|
) |
|
const |
__forceinline Point3 operator- |
( |
const Point3 & |
b |
) |
const [inline] |
__forceinline Point3 operator+ |
( |
const Point3 & |
b |
) |
const [inline] |
__forceinline Point3 operator/ |
( |
const Point3 & |
b |
) |
const [inline] |
__forceinline Point3 operator* |
( |
const Point3 & |
b |
) |
const [inline] |
- Returns:
- The cross product of two Point3's.
__forceinline float operator% |
( |
const Point3 & |
b |
) |
const [inline] |
{
return (x*b.x + y*b.y + z*b.z);
}
Member Data Documentation