This documentation is automatically generated from the openFrameworks source code using doxygen and refers to the most recent release, version 0.12.0.
ofVec3f.h
Go to the documentation of this file.
996 OF_DEPRECATED_MSG("Use member method getScaled() instead.", ofVec3f rescaled( const float length ) const);
999 OF_DEPRECATED_MSG("Use member method scale() instead.", ofVec3f& rescale( const float length ));
1002 OF_DEPRECATED_MSG("Use member method getRotated() instead.", ofVec3f rotated( float angle, const ofVec3f& axis ) const);
1005 OF_DEPRECATED_MSG("Use member method getRotated() instead.", ofVec3f rotated(float ax, float ay, float az));
1011 OF_DEPRECATED_MSG("Use member method getLimited() instead.", ofVec3f limited(float max) const);
1014 OF_DEPRECATED_MSG("Use member method getCrossed() instead.", ofVec3f crossed( const ofVec3f& vec ) const);
1017 OF_DEPRECATED_MSG("Use member method getPerpendicular() instead.", ofVec3f perpendiculared( const ofVec3f& vec ) const);
1020 OF_DEPRECATED_MSG("Use member method getMapped() instead.", ofVec3f mapped( const ofVec3f& origin,
1026 OF_DEPRECATED_MSG("Use member method squareDistance() instead.", float distanceSquared( const ofVec3f& pnt ) const);
1029 OF_DEPRECATED_MSG("Use member method getInterpolated() instead.", ofVec3f interpolated( const ofVec3f& pnt, float p ) const);
1032 OF_DEPRECATED_MSG("Use member method getMiddle() instead.", ofVec3f middled( const ofVec3f& pnt ) const);
ofVec3f & operator*=(const float f)
ofVec3f(const ofVec2f &vec)
ofVec3f operator-(const ofVec3f &vec) const
ofVec3f getMiddle(const ofVec3f &pnt) const
Calculate and return the midpoint between this vector and 'pnt'.
bool isAlignedRad(const ofVec3f &vec, float tolerance=0.0001f) const
ofVec3f operator/(const ofVec3f &vec) const
ofVec3f(const glm::vec3 &vec)
ofVec3f getRotated(float angle, const ofVec3f &axis) const
Returns a new vector that is the result of rotating this vector by 'angle' degrees about the given ax...
ofVec3f & rotate(float ax, float ay, float az)
Performs an Euler rotation of this vector by 'ax' degrees about the x axis, 'ay' degrees about the y ...
void set(float x, float y, float z=0)
Set 'x', 'y' and 'z' components of this vector with just one function call. 'z' is optional,...
ofVec3f & operator-=(const float f)
ofVec3f & operator/=(const float f)
float angleRad(const ofVec3f &vec) const
Calculate and return the coplanar angle in radians between this vector and 'vec'.
ofVec3f operator-(const float f) const
ofVec3f & scale(const float length)
Scales this vector up or down so that it has the requested length.
float lengthSquared() const
Return the squared length (squared magnitude) of this vector.
void set(float _scalar)
ofVec3f & operator+=(const ofVec3f &pnt)
bool match(const ofVec3f &vec, float tolerance=0.0001f) const
Let you check if two vectors are similar given a tolerance threshold 'tolerance' (default = 0....
ofVec3f getRotated(float angle, const ofVec3f &pivot, const ofVec3f &axis) const
Returns a new vector that is the result of rotating this vector by 'angle' degrees about the axis spe...
bool operator!=(const ofVec3f &vec) const
Returns 'true' if any component is different to its corresponding component in 'vec',...
ofVec3f operator-() const
ofVec3f getLimited(float max) const
Return a copy of this vector with its length (magnitude) restricted to a maximum of 'max' units by sc...
ofVec3f & operator*=(const ofVec3f &vec)
ofVec3f operator+(const ofVec3f &pnt) const
ofVec3f & rotate(float angle, const ofVec3f &pivot, const ofVec3f &axis)
Rotates this vector by 'angle' degrees about the axis specified by 'axis', using 'pivot' as the origi...
ofVec3f(const glm::vec2 &vec)
ofVec3f & map(const ofVec3f &origin, const ofVec3f &vx, const ofVec3f &vy, const ofVec3f &vz)
Map this vector from its default coordinate system – origin (0,0,0), X direction (1,...
float squareDistance(const ofVec3f &pnt) const
Treats both this vector and 'pnt' as points in 3D space, and calculates and returns the squared dista...
ofVec3f getRotatedRad(float ax, float ay, float az) const
Returns a new vector that is the result of performing an Euler rotation of this vector by 'ax' radian...
float length() const
ofVec3f(const glm::vec4 &vec)
ofVec3f & rotate(float angle, const ofVec3f &axis)
Rotates this vector by 'angle' degrees around the given axis.
ofVec3f getRotatedRad(float angle, const ofVec3f &pivot, const ofVec3f &axis) const
Returns a new vector that is the result of rotating this vector by 'angle' radians about the axis spe...
bool align(const ofVec3f &vec, float tolerance=0.0001f) const
Returns 'true' if this vector is pointing in the same direction as 'vec', with an angle error thresho...
ofVec3f getRotatedRad(float angle, const ofVec3f &axis) const
Returns a new vector that is the result of rotating this vector by 'angle' radians about the given ax...
bool isAligned(const ofVec3f &vec, float tolerance=0.0001f) const
float & operator[](int n)
Allows to access the individual components of an 'ofVec3f' as though it is an array.
Definition ofVec3f.h:177
bool alignRad(const ofVec3f &vec, float tolerance=0.0001f) const
Returns 'true' if this vector is pointing in the same direction as 'vec', with an angle error thresho...
ofVec3f & operator/=(const ofVec3f &vec)
ofVec3f operator*(const ofVec3f &vec) const
ofVec3f & middle(const ofVec3f &pnt)
float angle(const ofVec3f &vec) const
Calculate and return the coplanar angle in degrees between this vector and 'vec'.
ofVec3f & rotateRad(float angle, const ofVec3f &pivot, const ofVec3f &axis)
Rotates this vector by 'angle' radians around the axis specified by 'axis', using 'pivot' as the orig...
float distance(const ofVec3f &pnt) const
Treats both this vector and 'pnt' as points in 3D space, and calculates and returns the distance betw...
ofVec3f getInterpolated(const ofVec3f &pnt, float p) const
Perform a linear interpolation of this vector's position towards 'pnt' and return the interpolated ve...
void set(const ofVec3f &vec)
Setting the values by using other 3 dimension vector ofVec3f.
ofVec3f & cross(const ofVec3f &vec)
ofVec3f getScaled(const float length) const
Return a new 'ofVec3f' that is the result of scaling this vector up or down so that it has the reques...
ofVec3f operator/(const float f) const
ofVec3f getCrossed(const ofVec3f &vec) const
Returns the cross product (vector product) of this vector and 'vec'. This is a binary operation on tw...
ofVec3f operator+(const float f) const
ofVec3f & limit(float max)
Restrict the length (magnitude) of this vector to a maximum of 'max' units by scaling down if necessa...
ofVec3f operator*(const float f) const
ofVec3f getPerpendicular(const ofVec3f &vec) const
Construct a plane using this vector and 'vec' (by finding the plane that both lectors lie on),...
ofVec3f & rotateRad(float angle, const ofVec3f &axis)
Rotates this vector by 'angle' radians about the given axis.
ofVec3f & operator-=(const ofVec3f &vec)
ofVec3f(const ofVec4f &vec)
Construct a new 3D vector from a 4D vector by throwing away the 'w' component.
ofVec3f & interpolate(const ofVec3f &pnt, float p)
Perform a linear interpolation of this vector's position towards 'pnt'. 'p' controls the amount to mo...
ofVec3f getRotated(float ax, float ay, float az) const
Returns a new vector that is the result of performing an Euler rotation of this vector by 'ax' degree...
float * getPtr()
Returns a pointer to the memory position of the first element of the vector ('x'); the other elements...
Definition ofVec3f.h:156
ofVec3f & perpendicular(const ofVec3f &vec)
Construct a plane using this vector and 'vec' (by finding the plane that both lie on),...
ofVec3f & rotateRad(float ax, float ay, float az)
Performs an Euler rotation of this vector by 'ax' radians about the x axis, 'ay' radians about the y ...
ofVec3f & average(const ofVec3f *points, int num)
Sets this vector to be the average (centre of gravity or centroid) of a given array of 'ofVec3f's....
ofVec3f getMapped(const ofVec3f &origin, const ofVec3f &vx, const ofVec3f &vy, const ofVec3f &vz) const
Return a new 'ofVec3f' calculated by copying this vector and then mapping from its default coordinate...
ofVec3f & operator+=(const float f)
Definition ofVec4f.h:11
std::ostream & operator<<(std::ostream &os, const ofMatrix3x3 &M)
Definition ofMatrix3x3.cpp:304
#define d
#define tx
#define a
#define ty
#define tz
#define c
#define b