Visit Cem Yuksel's web site

Files

Class List

Class Members

Class Hierarchy

cyPoint4f Class Reference

#include <cyPoint.h>

List of all members.


Detailed Description

4D point class


Public Member Functions

Constructors
 cyPoint4f (float _x, float _y, float _z, float _w)
 cyPoint4f (const float *pt)
 cyPoint4f (const cyPoint4f &pt)
 cyPoint4f (const cyPoint3f &pt)
 cyPoint4f (const cyPoint3f &pt, float _w)
Set & Get value functions
cyPoint4fZero ()
 Sets x, y, z and w coordinates as zero.
cyPoint4fSet (float _x, float _y, float _z, float _w)
 Sets x, y, z and w coordinates as given.
cyPoint4fSet (const float *v)
 Sets x, y, z and w coordinates using the values in the given array.
void GetValue (float *v) const
 Puts x, y, z and w values into the array.
Length and Normalize functions
void Normalize ()
cyPoint4f GetNormalized () const
float LengthSquared () const
float Length () const
Limit functions
void ClampMinMax (float min, float max)
void ClampMin (float n)
void ClampMax (float n)
Unary operators
cyPoint4f operator- () const
cyPoint4f operator+ () const
Binary operators
cyPoint4f operator+ (const cyPoint4f &pt) const
cyPoint4f operator- (const cyPoint4f &pt) const
cyPoint4f operator * (const cyPoint4f &pt) const
cyPoint4f operator/ (const cyPoint4f &pt) const
cyPoint4f operator+ (float n) const
cyPoint4f operator- (float n) const
cyPoint4f operator * (float n) const
cyPoint4f operator/ (float n) const
Assignment operators
cyPoint4foperator+= (const cyPoint4f &pt)
cyPoint4foperator-= (const cyPoint4f &pt)
cyPoint4foperator *= (const cyPoint4f &pt)
cyPoint4foperator/= (const cyPoint4f &pt)
cyPoint4foperator+= (float n)
cyPoint4foperator-= (float n)
cyPoint4foperator *= (float n)
cyPoint4foperator/= (float n)
Test operators
int operator== (const cyPoint4f &pt) const
int operator!= (const cyPoint4f &pt) const
Access operators
float & operator[] (int i)
float operator[] (int i) const
float Dot (const cyPoint4f pt) const
 @ Dot product Dot product
float operator% (const cyPoint4f pt) const
 Dot product.
Conversion Methods
cyPoint2f XY () const
cyPoint3f XYZ () const

Public Attributes

float x
float y
float z
float w

Friends

cyPoint4f operator+ (const float v, const cyPoint4f &pt)
 Addition with a constant.
cyPoint4f operator- (const float v, const cyPoint4f &pt)
 Subtraction from a constant.
cyPoint4f operator * (const float v, const cyPoint4f &pt)
 Multiplication with a constant.

Visit Cem Yuksel's website!