Facebook Twitter YouTube

class Integer3D

Defined in:  TSInteger.h
The Integer3D class encapsulates a vector containing a triplet of integer coordinates.

class Integer3D : public Vec3D<int32>

Member Functions
Integer3D::Set Sets all three components of a vector.


Integer3D(int32 i, int32 j, int32 k);

template <typename type> Integer3D(const Vec3D<type>& w);

i The value of the x coordinate.
j The value of the y coordinate.
k The value of the z coordinate.
w Another 3D vector, possibly with a different component type, that is converted to an Integer3D.
The Integer3D class is used to store a vector having three integer components x, y, and z.

The default constructor leaves the components of the vector undefined. If the values i, j, and k are supplied, then they are assigned to the x, y, and z coordinates of the vector, respectively.
Overloaded Operators
Integer3D& operator +=(const Integer3D& v); Adds the vector v.
Integer3D& operator -=(const Integer3D& v); Subtracts the vector v.
Nonmember Operations
Integer3D operator +(const Integer3D& v1, const Integer3D& v2) const; Returns the componentwise sum of the vectors v1 and v2.
Integer3D operator -(const Integer3D& v1, const Integer3D& v2) const; Returns the componentwise difference of the vectors v1 and v2.
Integer3D operator *(const Integer3D& v, int32 t) const; Returns a vector for which each component of the vector v has been multiplied by t.
Integer3D operator /(const Integer3D& v, int32 t) const; Returns a vector for which each component of the vector v has been divided by t.
Base Classes
Vec3D Vectors use a generic base class to store their components.
See Also