This documentation is automatically generated from the openFrameworks source code using doxygen and refers to the most recent release, version 0.12.0.
ofVec4f.h
Go to the documentation of this file.
249 OF_DEPRECATED_MSG("Use member method getScaled() instead.", ofVec4f rescaled( const float length ) const);
252 OF_DEPRECATED_MSG("Use member method scale() instead.", ofVec4f& rescale( const float length ));
261 OF_DEPRECATED_MSG("Use member method squareDistance() instead.", float distanceSquared( const ofVec4f& pnt ) const);
264 OF_DEPRECATED_MSG("Use member method getInterpolated() instead.", ofVec4f interpolated( const ofVec4f& pnt, float p ) const);
267 OF_DEPRECATED_MSG("Use member method getMiddle() instead.", ofVec4f middled( const ofVec4f& pnt ) const);
440 return ofVec4f( vec.x!=0 ? x/vec.x : x , vec.y!=0 ? y/vec.y : y, vec.z!=0 ? z/vec.z : z, vec.w!=0 ? w/vec.w : w );
Definition ofVec4f.h:11
ofVec4f & limit(float max)
Restrict the length (magnitude) of this vector to a maximum of 'max' units by scaling down if necessa...
ofVec4f(float _scalar)
ofVec4f & normalize()
Normalizes the vector. This changes the current vector to its normalized value.
ofVec4f()
ofVec4f operator-() const
ofVec4f & scale(const float length)
Scales this vector up or down so that it has the requested length.
float squareDistance(const ofVec4f &pnt) const
void set(float _x, float _y, float _z, float _w)
float dot(const ofVec4f &vec) const
Calculates and returns the dot product of this vector with 'vec'.
float distance(const ofVec4f &pnt) const
Treats this vector and 'pnt' as points in 4D space and calculates the distance between them.
ofVec4f & operator*=(const ofVec4f &vec)
ofVec4f getLimited(float max) const
Returns a copy of this vector with its length (magnitude) restricted to a maximum of 'max' units by s...
ofVec4f operator+(const float f) const
ofVec4f & average(const ofVec4f *points, int num)
Sets this vector to be the average (center of gravity or centroid) of a given array of 'ofVec4f's.
ofVec4f getScaled(const float length) const
Returns a new ofVec4f that is the result of scaling this vector up or down so that it has the request...
ofVec4f operator-(const float f) const
ofVec4f operator-(const ofVec4f &vec) const
ofVec4f & operator/=(const ofVec4f &vec)
ofVec4f operator/(const float f) const
ofVec4f & operator/=(const float f)
ofVec4f & operator+=(const float f)
ofVec4f & operator*=(const float f)
void set(const ofVec4f &vec)
ofVec4f getInterpolated(const ofVec4f &pnt, float p) const
Performs a linear interpolation of this vector towards 'pnt'.
void set(float _scalar)
ofVec4f getMiddle(const ofVec4f &pnt) const
Calculates and returns the midpoint (as a vector) between this vector and 'pnt'.
ofVec4f operator/(const ofVec4f &vec) const
ofVec4f & middle(const ofVec4f &pnt)
Calculates and returns the midpoint (as a vector) between this vector and 'pnt'. This modifies the cu...
bool operator!=(const ofVec4f &vec) const
ofVec4f & operator-=(const float f)
ofVec4f(float _x, float _y, float _z, float _w)
bool match(const ofVec4f &vec, float tolerance=0.0001f) const
ofVec4f & interpolate(const ofVec4f &pnt, float p)
Performs a linear interpolation of this vector towards 'pnt'. This modifies the current vector to the...
ofVec4f operator*(const ofVec4f &vec) const
ofVec4f & operator-=(const ofVec4f &vec)
ofVec4f operator+(const ofVec4f &vec) const
ofVec4f & operator+=(const ofVec4f &vec)
ofVec4f operator*(const float f) const
bool operator==(const ofVec4f &vec) const
float lengthSquared() const
std::ostream & operator<<(std::ostream &os, const ofMatrix3x3 &M)
Definition ofMatrix3x3.cpp:304