Public Member Functions | Public Attributes | Friends | List of all members
IceMaths::HPoint Class Reference

#include <OPC_IceHook.h>

Inheritance diagram for IceMaths::HPoint:
Inheritance graph
[legend]

Public Member Functions

inline_ HPointAdd (float _x, float _y, float _z, float _w)
 Add a vector. More...
 
inline_ HPointAdd (const float f[4])
 Add a vector. More...
 
inline_ HPoint ()
 Empty constructor. More...
 
inline_ HPoint (float _x, float _y, float _z, float _w=0.0f)
 Constructor from floats. More...
 
inline_ HPoint (const float f[4])
 Constructor from array. More...
 
inline_ HPoint (const Point &p, float _w=0.0f)
 Constructor from a Point. More...
 
inline_ float Magnitude () const
 Computes magnitude. More...
 
float Max () const
 Returns MAX(x, y, z, w);. More...
 
HPointMax (const HPoint &p)
 Sets each element to be componentwise maximum. More...
 
float Min () const
 Returns MIN(x, y, z, w);. More...
 
HPointMin (const HPoint &p)
 Sets each element to be componentwise minimum. More...
 
inline_ HPointMul (float s)
 Multiplies by a scalar. More...
 
inline_ HPointNormalize ()
 Normalize the vector. More...
 
inline_ bool operator!= (const HPoint &p) const
 Operator for "if(HPoint!=HPoint)". More...
 
inline_ HPoint operator* (const HPoint &p) const
 Operator for HPoint Mul = HPoint * HPoint;. More...
 
inline_ HPoint operator* (float s) const
 Operator for HPoint Scale = HPoint * float;. More...
 
Point operator* (const Matrix3x3 &mat) const
 Operator for Point Mul = HPoint * Matrix3x3;. More...
 
HPoint operator* (const Matrix4x4 &mat) const
 Operator for HPoint Mul = HPoint * Matrix4x4;. More...
 
inline_ HPointoperator*= (const HPoint &p)
 Operator for HPoint *= HPoint;. More...
 
inline_ HPointoperator*= (float s)
 Operator for HPoint *= float;. More...
 
HPointoperator*= (const Matrix4x4 &mat)
 Operator for HPoint *= Matrix4x4. More...
 
inline_ HPoint operator+ (const HPoint &p) const
 Operator for HPoint Plus = HPoint + HPoint;. More...
 
inline_ HPointoperator+= (const HPoint &p)
 Operator for HPoint += HPoint;. More...
 
inline_ HPointoperator+= (float s)
 Operator for HPoint += float;. More...
 
inline_ HPoint operator- () const
 Operator for HPoint Negate = - HPoint;. More...
 
inline_ HPoint operator- (const HPoint &p) const
 Operator for HPoint Minus = HPoint - HPoint;. More...
 
inline_ HPointoperator-= (const HPoint &p)
 Operator for HPoint -= HPoint;. More...
 
inline_ HPointoperator-= (float s)
 Operator for HPoint -= float;. More...
 
inline_ HPoint operator/ (const HPoint &p) const
 Operator for HPoint Div = HPoint / HPoint;. More...
 
inline_ HPoint operator/ (float s) const
 Operator for HPoint Scale = HPoint / float;. More...
 
inline_ HPointoperator/= (const HPoint &p)
 Operator for HPoint /= HPoint;. More...
 
inline_ HPointoperator/= (float s)
 Operator for HPoint /= float;. More...
 
inline_ bool operator== (const HPoint &p) const
 Operator for "if(HPoint==HPoint)". More...
 
inline_ float operator| (const HPoint &p) const
 Operator for float DotProd = HPoint | HPoint;. More...
 
inline_ HPointSet (float _x, float _y, float _z, float _w)
 Assignment from values. More...
 
inline_ HPointSet (const float f[4])
 Assignment from array. More...
 
inline_ HPointSet (const HPoint &src)
 Assignment from another h-point. More...
 
inline_ float SquareMagnitude () const
 Computes square magnitude. More...
 
inline_ HPointSub (float _x, float _y, float _z, float _w)
 Subtract a vector. More...
 
inline_ HPointSub (const float f[4])
 Subtract a vector. More...
 
inline_ HPointZero ()
 Clear the point. More...
 
inline_ ~HPoint ()
 Destructor. More...
 
- Public Member Functions inherited from IceMaths::Point
inline_ PointAdd (const Point &p)
 Adds a vector. More...
 
inline_ PointAdd (float _x, float _y, float _z)
 Adds a vector. More...
 
inline_ PointAdd (const float f[3])
 Adds a vector. More...
 
inline_ PointAdd (const Point &p, const Point &q)
 Adds vectors. More...
 
inline_ bool ApproxZero () const
 Checks the point is near zero. More...
 
inline_ PointClamp (float min, float max)
 Clamps each element. More...
 
inline_ PointClampLength (float limit_length)
 Clamps vector length. More...
 
inline_ PointComponent ClosestAxis () const
 Returns closest axis. More...
 
inline_ PointCross (const Point &a, const Point &b)
 Cross product this = a x b. More...
 
inline_ float Distance (const Point &b) const
 Computes distance to another point. More...
 
inline_ float Dot (const Point &p) const
 Dot product dp = this|a. More...
 
inline_ udword GetHashValue () const
 Hash function from Ville Miettinen. More...
 
inline_ PointHerp (const Point &p0, const Point &p1, const Point &p2, const Point &p3, float t)
 
inline_ PointInvTransform (const Point &r, const Matrix3x3 &rotpos, const Point &linpos)
 this = trans(rotpos) * (r - linpos) More...
 
BOOL IsNotUsed () const
 Checks the point is marked as not used. More...
 
inline_ BOOL IsValid () const
 Checks point validity. More...
 
inline_ BOOL IsZero () const
 Tests for exact zero vector. More...
 
inline_ PointComponent LargestAxis () const
 Returns largest axis. More...
 
inline_ PointLerp (const Point &a, const Point &b, float t)
 Linear interpolate between two vectors: this = a + t * (b - a) More...
 
inline_ PointMac (const Point &a, const Point &b, float scalar)
 this = a + b * scalar More...
 
inline_ PointMac (const Point &a, float scalar)
 this = this + a * scalar More...
 
inline_ PointMac (const Matrix3x3 &mat, const Point &a)
 this = this + mat * a More...
 
inline_ PointMac2 (const Point &a, const Point &b, float scalarb, const Point &c, float scalarc)
 this = a + b * scalarb + c * scalarc More...
 
inline_ float Magnitude () const
 Computes magnitude. More...
 
inline_ float Max () const
 Returns MAX(x, y, z);. More...
 
inline_ PointMax (const Point &p)
 Sets each element to be componentwise maximum. More...
 
inline_ float Min () const
 Returns MIN(x, y, z);. More...
 
inline_ PointMin (const Point &p)
 Sets each element to be componentwise minimum. More...
 
inline_ PointMsc (const Point &a, const Point &b, float scalar)
 this = a - b * scalar More...
 
inline_ PointMsc (const Point &a, float scalar)
 this = this - a * scalar More...
 
inline_ PointMsc2 (const Point &a, const Point &b, float scalarb, const Point &c, float scalarc)
 this = a - b * scalarb - c * scalarc More...
 
inline_ PointMult (float s)
 Multiplies by a scalar. More...
 
inline_ PointMult (const Point &a, float scalar)
 this = a * scalar More...
 
inline_ PointMult (const Matrix3x3 &mat, const Point &a)
 this = mat * a More...
 
inline_ PointMult2 (const Matrix3x3 &mat1, const Point &a1, const Matrix3x3 &mat2, const Point &a2)
 this = mat1 * a1 + mat2 * a2 More...
 
inline_ PointNeg ()
 this = -this More...
 
inline_ PointNeg (const Point &a)
 this = -a More...
 
inline_ PointNormalize ()
 Normalizes the vector. More...
 
inline_ operator const float * () const
 
inline_ operator float * ()
 
 operator HPoint () const
 Cast a Point to a HPoint. w is set to zero. More...
 
inline_ bool operator!= (const Point &p) const
 Operator for "if(Point!=Point)". More...
 
inline_ Point operator* (const Point &p) const
 Operator for Point Mul = Point * Point. More...
 
inline_ Point operator* (float s) const
 Operator for Point Scale = Point * float. More...
 
inline_ Point operator* (const Matrix3x3 &mat) const
 Operator for Point Mul = Point * Matrix3x3. More...
 
inline_ Point operator* (const Matrix4x4 &mat) const
 Operator for Point Mul = Point * Matrix4x4. More...
 
inline_ Pointoperator*= (const Point &p)
 Operator for Point *= Point. More...
 
inline_ Pointoperator*= (float s)
 Operator for Point *= float. More...
 
inline_ Pointoperator*= (const Matrix3x3 &mat)
 Operator for Point *= Matrix3x3. More...
 
inline_ Pointoperator*= (const Matrix4x4 &mat)
 Operator for Point *= Matrix4x4. More...
 
inline_ Point operator+ (const Point &p) const
 Operator for Point Plus = Point + Point. More...
 
inline_ Pointoperator+= (const Point &p)
 Operator for Point += Point. More...
 
inline_ Pointoperator+= (float s)
 Operator for Point += float. More...
 
inline_ Point operator- () const
 Unary operator for Point Negate = - Point. More...
 
inline_ Point operator- (const Point &p) const
 Operator for Point Minus = Point - Point. More...
 
inline_ Pointoperator-= (const Point &p)
 Operator for Point -= Point. More...
 
inline_ Pointoperator-= (float s)
 Operator for Point -= float. More...
 
inline_ Point operator/ (const Point &p) const
 Operator for Point Div = Point / Point. More...
 
inline_ Point operator/ (float s) const
 Operator for Point Scale = Point / float. More...
 
inline_ Pointoperator/= (const Point &p)
 Operator for Point /= Point. More...
 
inline_ Pointoperator/= (float s)
 Operator for Point /= float. More...
 
inline_ bool operator== (const Point &p) const
 Operator for "if(Point==Point)". More...
 
inline_ Point operator^ (const Point &p) const
 Operator for Point VecProd = Point ^ Point. More...
 
inline_ float operator| (const Point &p) const
 Operator for float DotProd = Point | Point. More...
 
inline_ Point ()
 Empty constructor. More...
 
inline_ Point (float _x, float _y, float _z)
 Constructor from a single float. More...
 
inline_ Point (const float f[3])
 Constructor from array. More...
 
inline_ Point (const Point &p)
 Copy constructor. More...
 
PointPositiveUnitRandomVector ()
 Sets positive unit random vector. More...
 
PointProjectToPlane (const Plane &p)
 Projects the point onto a plane. More...
 
void ProjectToScreen (float halfrenderwidth, float halfrenderheight, const Matrix4x4 &mat, HPoint &projected) const
 Projects the point onto the screen. More...
 
PointRefract (const Point &eye, const Point &n, float refractindex, Point &refracted)
 Refracts the point. More...
 
inline_ PointSet (float _x, float _y, float _z)
 Assignment from values. More...
 
inline_ PointSet (const float f[3])
 Assignment from array. More...
 
inline_ PointSet (const Point &src)
 Assignment from another point. More...
 
inline_ PointSetLength (float length)
 Sets vector length. More...
 
inline_ PointSetMinusInfinity ()
 
void SetNotUsed ()
 Stuff magic values in the point, marking it as explicitely not used. More...
 
inline_ PointSetPlusInfinity ()
 
inline_ PointComponent SmallestAxis () const
 Returns smallest axis. More...
 
inline_ float SquareDistance (const Point &b) const
 Computes square distance to another point. More...
 
inline_ float SquareMagnitude () const
 Computes square magnitude. More...
 
inline_ PointSub (const Point &p)
 Subtracts a vector. More...
 
inline_ PointSub (float _x, float _y, float _z)
 Subtracts a vector. More...
 
inline_ PointSub (const float f[3])
 Subtracts a vector. More...
 
inline_ PointSub (const Point &p, const Point &q)
 Subtracts vectors. More...
 
inline_ PointTransform (const Point &r, const Matrix3x3 &rotpos, const Point &linpos)
 this = rotpos * r + linpos More...
 
inline_ PointTransMult (const Matrix3x3 &mat, const Point &a)
 this = transpose(mat) * a More...
 
void Tweak (udword coord_mask, udword tweak_mask)
 Slighty moves the point. More...
 
inline_ void TweakBigger ()
 Slighty moves the point out. More...
 
inline_ void TweakSmaller ()
 Slighty moves the point in. More...
 
PointUnfold (Plane &p, Point &a, Point &b)
 Unfolds the point onto a plane according to edge(a,b) More...
 
PointUnitRandomVector ()
 Sets unit random vector. More...
 
inline_ udword VectorCode () const
 Vector code ( bitmask = sign(z) | sign(y) | sign(x) ) More...
 
inline_ float Volume () const
 Computes volume. More...
 
inline_ PointZero ()
 Clears the vector. More...
 
inline_ ~Point ()
 Destructor. More...
 

Public Attributes

float w
 Cast a HPoint to a Point. w is discarded. More...
 
- Public Attributes inherited from IceMaths::Point
float x
 
float y
 
float z
 

Friends

inline_ friend HPoint operator* (float s, const HPoint &p)
 Operator for HPoint Scale = float * HPoint;. More...
 
inline_ friend HPoint operator/ (float s, const HPoint &p)
 Operator for HPoint Scale = float / HPoint;. More...
 

Detailed Description

Definition at line 16 of file OPC_IceHook.h.

Constructor & Destructor Documentation

◆ HPoint() [1/4]

inline_ IceMaths::HPoint::HPoint ( )
inline

Empty constructor.

Definition at line 21 of file OPC_IceHook.h.

◆ HPoint() [2/4]

inline_ IceMaths::HPoint::HPoint ( float  _x,
float  _y,
float  _z,
float  _w = 0.0f 
)
inline

Constructor from floats.

Definition at line 23 of file OPC_IceHook.h.

◆ HPoint() [3/4]

inline_ IceMaths::HPoint::HPoint ( const float  f[4])
inline

Constructor from array.

Definition at line 25 of file OPC_IceHook.h.

◆ HPoint() [4/4]

inline_ IceMaths::HPoint::HPoint ( const Point p,
float  _w = 0.0f 
)
inline

Constructor from a Point.

Definition at line 27 of file OPC_IceHook.h.

◆ ~HPoint()

inline_ IceMaths::HPoint::~HPoint ( )
inline

Destructor.

Definition at line 29 of file OPC_IceHook.h.

Member Function Documentation

◆ Add() [1/2]

inline_ HPoint& IceMaths::HPoint::Add ( float  _x,
float  _y,
float  _z,
float  _w 
)
inline

Add a vector.

Definition at line 42 of file OPC_IceHook.h.

◆ Add() [2/2]

inline_ HPoint& IceMaths::HPoint::Add ( const float  f[4])
inline

Add a vector.

Definition at line 44 of file OPC_IceHook.h.

◆ Magnitude()

inline_ float IceMaths::HPoint::Magnitude ( ) const
inline

Computes magnitude.

Definition at line 66 of file OPC_IceHook.h.

◆ Max() [1/2]

float IceMaths::HPoint::Max ( ) const
inline

Returns MAX(x, y, z, w);.

Definition at line 57 of file OPC_IceHook.h.

◆ Max() [2/2]

HPoint& IceMaths::HPoint::Max ( const HPoint p)
inline

Sets each element to be componentwise maximum.

Definition at line 61 of file OPC_IceHook.h.

◆ Min() [1/2]

float IceMaths::HPoint::Min ( ) const
inline

Returns MIN(x, y, z, w);.

Definition at line 55 of file OPC_IceHook.h.

◆ Min() [2/2]

HPoint& IceMaths::HPoint::Min ( const HPoint p)
inline

Sets each element to be componentwise minimum.

Definition at line 59 of file OPC_IceHook.h.

◆ Mul()

inline_ HPoint& IceMaths::HPoint::Mul ( float  s)
inline

Multiplies by a scalar.

Definition at line 52 of file OPC_IceHook.h.

◆ Normalize()

inline_ HPoint& IceMaths::HPoint::Normalize ( )
inline

Normalize the vector.

Definition at line 69 of file OPC_IceHook.h.

◆ operator!=()

inline_ bool IceMaths::HPoint::operator!= ( const HPoint p) const
inline

Operator for "if(HPoint!=HPoint)".

Definition at line 146 of file OPC_IceHook.h.

◆ operator*() [1/4]

inline_ HPoint IceMaths::HPoint::operator* ( const HPoint p) const
inline

Operator for HPoint Mul = HPoint * HPoint;.

Definition at line 93 of file OPC_IceHook.h.

◆ operator*() [2/4]

inline_ HPoint IceMaths::HPoint::operator* ( float  s) const
inline

Operator for HPoint Scale = HPoint * float;.

Definition at line 95 of file OPC_IceHook.h.

◆ operator*() [3/4]

Point HPoint::operator* ( const Matrix3x3 mat) const

Operator for Point Mul = HPoint * Matrix3x3;.

Definition at line 36 of file IceHPoint.cpp.

◆ operator*() [4/4]

HPoint HPoint::operator* ( const Matrix4x4 mat) const

Operator for HPoint Mul = HPoint * Matrix4x4;.

Definition at line 47 of file IceHPoint.cpp.

◆ operator*=() [1/3]

inline_ HPoint& IceMaths::HPoint::operator*= ( const HPoint p)
inline

Operator for HPoint *= HPoint;.

Definition at line 121 of file OPC_IceHook.h.

◆ operator*=() [2/3]

inline_ HPoint& IceMaths::HPoint::operator*= ( float  s)
inline

Operator for HPoint *= float;.

Definition at line 123 of file OPC_IceHook.h.

◆ operator*=() [3/3]

HPoint & HPoint::operator*= ( const Matrix4x4 mat)

Operator for HPoint *= Matrix4x4.

Definition at line 59 of file IceHPoint.cpp.

◆ operator+()

inline_ HPoint IceMaths::HPoint::operator+ ( const HPoint p) const
inline

Operator for HPoint Plus = HPoint + HPoint;.

Definition at line 88 of file OPC_IceHook.h.

◆ operator+=() [1/2]

inline_ HPoint& IceMaths::HPoint::operator+= ( const HPoint p)
inline

Operator for HPoint += HPoint;.

Definition at line 111 of file OPC_IceHook.h.

◆ operator+=() [2/2]

inline_ HPoint& IceMaths::HPoint::operator+= ( float  s)
inline

Operator for HPoint += float;.

Definition at line 113 of file OPC_IceHook.h.

◆ operator-() [1/2]

inline_ HPoint IceMaths::HPoint::operator- ( ) const
inline

Operator for HPoint Negate = - HPoint;.

Definition at line 85 of file OPC_IceHook.h.

◆ operator-() [2/2]

inline_ HPoint IceMaths::HPoint::operator- ( const HPoint p) const
inline

Operator for HPoint Minus = HPoint - HPoint;.

Definition at line 90 of file OPC_IceHook.h.

◆ operator-=() [1/2]

inline_ HPoint& IceMaths::HPoint::operator-= ( const HPoint p)
inline

Operator for HPoint -= HPoint;.

Definition at line 116 of file OPC_IceHook.h.

◆ operator-=() [2/2]

inline_ HPoint& IceMaths::HPoint::operator-= ( float  s)
inline

Operator for HPoint -= float;.

Definition at line 118 of file OPC_IceHook.h.

◆ operator/() [1/2]

inline_ HPoint IceMaths::HPoint::operator/ ( const HPoint p) const
inline

Operator for HPoint Div = HPoint / HPoint;.

Definition at line 100 of file OPC_IceHook.h.

◆ operator/() [2/2]

inline_ HPoint IceMaths::HPoint::operator/ ( float  s) const
inline

Operator for HPoint Scale = HPoint / float;.

Definition at line 102 of file OPC_IceHook.h.

◆ operator/=() [1/2]

inline_ HPoint& IceMaths::HPoint::operator/= ( const HPoint p)
inline

Operator for HPoint /= HPoint;.

Definition at line 126 of file OPC_IceHook.h.

◆ operator/=() [2/2]

inline_ HPoint& IceMaths::HPoint::operator/= ( float  s)
inline

Operator for HPoint /= float;.

Definition at line 128 of file OPC_IceHook.h.

◆ operator==()

inline_ bool IceMaths::HPoint::operator== ( const HPoint p) const
inline

Operator for "if(HPoint==HPoint)".

Definition at line 144 of file OPC_IceHook.h.

◆ operator|()

inline_ float IceMaths::HPoint::operator| ( const HPoint p) const
inline

Operator for float DotProd = HPoint | HPoint;.

Definition at line 107 of file OPC_IceHook.h.

◆ Set() [1/3]

inline_ HPoint& IceMaths::HPoint::Set ( float  _x,
float  _y,
float  _z,
float  _w 
)
inline

Assignment from values.

Definition at line 35 of file OPC_IceHook.h.

◆ Set() [2/3]

inline_ HPoint& IceMaths::HPoint::Set ( const float  f[4])
inline

Assignment from array.

Definition at line 37 of file OPC_IceHook.h.

◆ Set() [3/3]

inline_ HPoint& IceMaths::HPoint::Set ( const HPoint src)
inline

Assignment from another h-point.

Definition at line 39 of file OPC_IceHook.h.

◆ SquareMagnitude()

inline_ float IceMaths::HPoint::SquareMagnitude ( ) const
inline

Computes square magnitude.

Definition at line 64 of file OPC_IceHook.h.

◆ Sub() [1/2]

inline_ HPoint& IceMaths::HPoint::Sub ( float  _x,
float  _y,
float  _z,
float  _w 
)
inline

Subtract a vector.

Definition at line 47 of file OPC_IceHook.h.

◆ Sub() [2/2]

inline_ HPoint& IceMaths::HPoint::Sub ( const float  f[4])
inline

Subtract a vector.

Definition at line 49 of file OPC_IceHook.h.

◆ Zero()

inline_ HPoint& IceMaths::HPoint::Zero ( )
inline

Clear the point.

Definition at line 32 of file OPC_IceHook.h.

Friends And Related Function Documentation

◆ operator*

inline_ friend HPoint operator* ( float  s,
const HPoint p 
)
friend

Operator for HPoint Scale = float * HPoint;.

Definition at line 97 of file OPC_IceHook.h.

◆ operator/

inline_ friend HPoint operator/ ( float  s,
const HPoint p 
)
friend

Operator for HPoint Scale = float / HPoint;.

Definition at line 104 of file OPC_IceHook.h.

Member Data Documentation

◆ w

float IceMaths::HPoint::w

Cast a HPoint to a Point. w is discarded.

Definition at line 157 of file OPC_IceHook.h.


The documentation for this class was generated from the following files:


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Thu Sep 8 2022 02:24:09