This reference page is linked to from the following overview
topics: Lesson
4: Animation Controllers, Lesson
6: Parameter Blocks, Parameter
Types, Parameter
Tags, Spinner
and Slider Control Types, Getting
and Setting Parameter Block Values, Computing
Face Normals, Computing
Vertex Normals, Vertex
Color Information, Matrix
Fundamentals, Rotation,
Scaling,
Object
Offset Transformation, Creating
Primitive NURBS Objects, Principal
Classes for Materials and Textures, Texture
Coordinates, Controllers,
Keyframe
Data Access Classes and Methods, Main
Physique Export API Elements, IK
Concepts, The
Enhanced 3ds Max .NET SDK.
Detailed 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);
#include <point3.h>
List of all members.
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] |
float LengthSquared |
( |
|
) |
const [inline] |
int MaxComponent |
( |
|
) |
const |
int MinComponent |
( |
|
) |
const |
{
x -= a.x; y -= a.y; z -= a.z;
return *this;
}
{
x += a.x; y += a.y; z += a.z;
return *this;
}
Point3 & operator*= |
( |
float |
f |
) |
[inline] |
{
x *= f; y *= f; z *= f;
return *this;
}
Point3 & operator/= |
( |
float |
f |
) |
[inline] |
{
x /= f; y /= f; z /= f;
return *this;
}
{
x *= a.x; y *= a.y; z *= a.z;
return *this;
}
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 |
- Returns:
- The cross product of two Point3's.
float operator% |
( |
const Point3 & |
b |
) |
const [inline] |
{
return (x*b.x + y*b.y + z*b.z);
}
Member Data Documentation