Visit Cem Yuksel's web site

Files

Class List

Class Members

Class Hierarchy

cyPoint3f Class Reference

#include <cyPoint.h>

List of all members.


Detailed Description

3D point class


Public Member Functions

Constructors
 cyPoint3f (float _x, float _y, float _z)
 cyPoint3f (const float *pt)
 cyPoint3f (const cyPoint3f &pt)
 cyPoint3f (const cyPoint2f &pt)
 cyPoint3f (const cyPoint2f &pt, float _z)
Set & Get value functions
cyPoint3fZero ()
 Sets x, y and z coordinates as zero.
cyPoint3fSet (float _x, float _y, float _z)
 Sets x, y and z coordinates as given.
cyPoint3fSet (const float *v)
 Sets x, y and z coordinates using the values in the given array.
void GetValue (float *v) const
 Puts x, y and z values into the array.
Length and Normalize functions
void Normalize ()
cyPoint3f 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
cyPoint3f operator- () const
cyPoint3f operator+ () const
Binary operators
cyPoint3f operator+ (const cyPoint3f &pt) const
cyPoint3f operator- (const cyPoint3f &pt) const
cyPoint3f operator * (const cyPoint3f &pt) const
cyPoint3f operator/ (const cyPoint3f &pt) const
cyPoint3f operator+ (float n) const
cyPoint3f operator- (float n) const
cyPoint3f operator * (float n) const
cyPoint3f operator/ (float n) const
Assignment operators
cyPoint3foperator+= (const cyPoint3f &pt)
cyPoint3foperator-= (const cyPoint3f &pt)
cyPoint3foperator *= (const cyPoint3f &pt)
cyPoint3foperator/= (const cyPoint3f &pt)
cyPoint3foperator+= (float n)
cyPoint3foperator-= (float n)
cyPoint3foperator *= (float n)
cyPoint3foperator/= (float n)
Test operators
int operator== (const cyPoint3f &pt) const
int operator!= (const cyPoint3f &pt) const
Access operators
float & operator[] (int i)
float operator[] (int i) const
Cross product and dot product
cyPoint3f Cross (const cyPoint3f pt) const
 Cross product.
cyPoint3f operator^ (const cyPoint3f pt) const
 Cross product.
float Dot (const cyPoint3f pt) const
 Dot product.
float operator% (const cyPoint3f pt) const
 Dot product.
Conversion Methods
cyPoint2f XY () const

Public Attributes

float x
float y
float z

Friends

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

Visit Cem Yuksel's website!