17 #pragma warning(disable : 4201)
21 #include <xmmintrin.h>
23 #if defined(WIN32) || defined(WIN64)
27 #if (defined(_WIN32) && !defined(_WIN64))
39 inline Vector(
void ) throw() {
x =
y =
z = 0.0f; };
42 inline Vector(
float fX,
float fY,
float fZ = 0.0
f ) throw()
43 {
x = fX;
y = fY;
z = fZ; };
47 {
x = vVector.x;
y = vVector.y;
z = vVector.z; };
52 inline Vector(
const char *pVector )
throw()
53 {
x = pVector[0]*(1.0f/127.0f);
y = pVector[1]*(1.0f/127.0f);
z = pVector[2]*(1.0f/127.0f); };
57 inline Vector(
const short *pVector )
throw()
58 {
x = pVector[0]*(1.0f/32767.0f);
y = pVector[1]*(1.0f/32767.0f);
z = pVector[2]*(1.0f/32767.0f); };
61 inline Vector &
Set(
float fX,
float fY,
float fZ )
throw()
62 {
x = fX;
y = fY;
z = fZ;
return *
this; };
66 {
return Set( 0.0
f, 0.0
f, 0.0
f ); };
71 Vector &Normalize(
void ) throw();
77 Vector &NormalizeApprox(
void ) throw();
80 Vector Normalized(
void ) const throw();
95 { Normalize(); operator *=( fLength );
return *
this; };
104 {
float fLen = Length(); MakeOrthogonal( vBase ); SetLength( fLen );
return *
this; };
111 float Length()
const throw();
114 float Length2D() const throw();
139 float* aBaryCoords = 0 )
const;
260 {
return x*
v.x+
y*
v.y+
z*
v.z; };
276 {
return x ==
v.x &&
y ==
v.y &&
z ==
v.z; };
283 inline operator bool(
void )
const throw() {
return x ||
y ||
z; };
286 inline bool operator !(
void )
const throw() {
return !
operator bool(); };
290 {
x = v.
x;
y = v.
y;
z = v.
z;
return *
this; };
294 {
x = v.
x;
y = v.
y;
z = v.
z;
return *
this; };
299 {
x-=
v.
x;
y-=
v.y;
z-=
v.z;
return *
this; };
303 {
x+=
v.x;
y+=
v.y;
z+=
v.z;
return *
this; };
307 {
x+=
f;
y+=
f;
z+=
f;
return *
this; };
310 inline Vector &operator -=(
const float f )
throw()
311 {
x-=
f;
y-=
f;
z-=
f;
return *
this; };
315 inline Vector &operator *=(
float f )
throw() {
x *=
f;
y *=
f;
z *=
f;
return *
this; };
320 {
x *=
v.
x;
y *=
v.y;
z *=
v.z;
return *
this; };
323 inline Vector &operator /=(
float f ) {
return operator *=( 1.0f/f ); };
326 inline float &operator [] (
328 )
throw() {
return m_aCoors[i]; };
331 inline float &operator [](
333 )
throw() {
return m_aCoors[i]; };
336 inline operator const float *(
void )
const {
return &
x; };
339 struct {
float m_fX, m_fY,
m_fZ; };
340 struct {
float x,
y,
z; };
356 return Vector((
float)
x, (
float)
y, (
float)
z);
360 inline DblVector(
double fX,
double fY,
double fZ = 0.0 ) throw()
361 {
x = fX;
y = fY;
z = fZ; };
365 {
x = vVector.x;
y = vVector.y;
z = vVector.z; };
369 {
x = vVector.x;
y = vVector.y;
z = vVector.z; };
375 {
x = pVector[0]*(1.0/127.0);
y = pVector[1]*(1.0/127.0);
z = pVector[2]*(1.0/127.0); };
380 {
x = pVector[0]*(1.0/32767.0);
y = pVector[1]*(1.0/32767.0);
z = pVector[2]*(1.0/32767.0); };
384 {
x = fX;
y = fY;
z = fZ;
return *
this; };
388 {
return Set( 0.0, 0.0, 0.0 ); };
396 DblVector Normalized(
void ) const throw();
411 { Normalize(); operator *=( fLength );
return *
this; };
418 double Length()
const throw();
421 double Length2D() const throw();
497 {
return x*
v.x+
y*
v.y+
z*
v.z; };
512 {
return x ==
v.x &&
y ==
v.y &&
z ==
v.z; };
519 inline operator bool(
void )
const throw() {
return x ||
y ||
z; };
522 inline bool operator !(
void )
const throw() {
return !
operator bool(); };
526 {
x = v.
x;
y = v.
y;
z = v.
z;
return *
this; };
530 {
x = v.
x;
y = v.
y;
z = v.
z;
return *
this; };
535 {
x-=
v.
x;
y-=
v.y;
z-=
v.z;
return *
this; };
539 {
x+=
v.x;
y+=
v.y;
z+=
v.z;
return *
this; };
548 {
x *= v.
x;
y *= v.
y;
z *= v.
z;
return *
this; };
551 inline DblVector &operator /=(
double f ) {
return operator *=( 1.0/f ); };
554 inline double &operator [] (
556 )
throw() {
return m_aCoors[i]; };
559 inline double &operator [](
561 )
throw() {
return m_aCoors[i]; };
564 inline operator const double *(
void )
const {
return &
x; };
567 struct {
double m_fX, m_fY,
m_fZ; };
568 struct {
double x,
y,
z; };
580 {
return float(i)*
v; };
588 {
return double(i)*
v; };
590 typedef AttributeInstance<Vector>
avector;
594 avector *pAttribute );
625 {
return x ==
v.x &&
y ==
v.y &&
z ==
v.z; };
635 #if !defined OS_32BIT
681 Color(
float fRed = 1.0
f,
float fGreen = 1.0
f,
float fBlue = 1.0
f,
float fAlpha = 1.0
f )
682 { m_fRed = fRed; m_fGreen = fGreen; m_fBlue = fBlue, m_fAlpha = fAlpha; };
695 inline void Set(
float fRed,
float fGreen,
float fBlue,
float fAlpha = 1.0
f )
696 {
r = fRed;
g = fGreen;
b = fBlue;
a = fAlpha; };
701 inline operator const float *(
void )
const {
return &m_fRed; };
705 {
MB_ASSERT( iChannel < 4 );
return m_fData[iChannel]; };
709 inline operator unsigned int(
void )
const
710 {
return (
unsigned int)(0xff*m_fRed)+(((
unsigned int)(0xff*m_fGreen))<<8)+
711 (((
unsigned int)(0xff*m_fBlue))<<16)+(((
unsigned int)(0xff*m_fAlpha))<<24); };
733 {
r *= c.
r;
g *= c.
g;
b *= c.
b;
a *= c.
a;
return *
this; };
745 {
r += c.
r;
g += c.
g;
b += c.
b;
a += c.
a;
return *
this; };
749 {
return r == c.
r &&
g == c.
g &&
b == c.
b &&
a == c.
a; };
763 {
return Color(
r*f+c.
r*(1-f),
g*f+c.
g*(1-f),
b*f+c.
b*(1-f),
a*f+c.
a*(1-f) ); };
767 {
return 0.299f *
r + 0.587f *
g + 0.114f *
b; }
770 void toHSV(
float &hue,
float &sat,
float &val)
const;
771 void fromHSV(
float hue,
float sat,
float val);
773 void toCMYK (
float &c,
float &m,
float &
y,
float &k)
const;
774 void fromCMYK (
float c,
float m,
float y,
float k);
782 struct {
float m_fRed, m_fGreen, m_fBlue, m_fAlpha; };
787 #if !defined OS_32BIT
809 typedef AttributeInstance<Color>
acolor;
818 Attribute::AttributeType acolor::Type(
void )
const {
return typeColor; };
821 QString acolor::AsString(
bool )
822 const {
return QString(
"%1 %2 %3 %4").
arg(m_cValue.r).
arg(m_cValue.g).
arg(m_cValue.b).
arg(m_cValue.a); };
825 void acolor::SetFromString(
const QString &s,
bool ,
bool )
853 Vector v( fSize, fSize, fSize );
854 m_vStart = vCenter-
v;
860 m_vStart( cA.m_vStart ),
861 m_vEnd( cA.m_vEnd ) {};
874 for (
int i = 0; i < 8; i++ ) Extend( cBB[i] );
887 m_vStart.Set( 0, 0, 0 );
888 m_vEnd.Set( -1, -1, -1 );
892 void Serialize(
Stream &s );
904 m_vStart = m_vEnd = cV;
906 if ( m_vStart.m_fX > cV.m_fX ) m_vStart.m_fX = cV.m_fX;
907 if ( m_vStart.m_fY > cV.m_fY ) m_vStart.m_fY = cV.m_fY;
908 if ( m_vStart.m_fZ > cV.m_fZ ) m_vStart.m_fZ = cV.m_fZ;
909 if ( m_vEnd.m_fX < cV.m_fX ) m_vEnd.m_fX = cV.m_fX;
910 if ( m_vEnd.m_fY < cV.m_fY ) m_vEnd.m_fY = cV.m_fY;
911 if ( m_vEnd.m_fZ < cV.m_fZ ) m_vEnd.m_fZ = cV.m_fZ;
936 void Transform(
const class Matrix &mMatrix );
939 Vector operator [](
int iCornerIndex )
const;
942 float Size(
void )
const {
return Max(
Max( XSize(), YSize() ), ZSize() ); };
945 float XSize(
void )
const {
return m_vEnd.m_fX-m_vStart.m_fX; };
948 float YSize(
void )
const {
return m_vEnd.m_fY-m_vStart.m_fY; };
951 float ZSize(
void )
const {
return m_vEnd.m_fZ-m_vStart.m_fZ; };
954 float Volume(
void )
const {
return XSize()*YSize()*ZSize(); };
995 m_vStart.m_fX <= cV.
m_fX && m_vEnd.m_fX >= cV.
m_fX &&
996 m_vStart.m_fY <= cV.
m_fY && m_vEnd.m_fY >= cV.
m_fY &&
997 m_vStart.m_fZ <= cV.
m_fZ && m_vEnd.m_fZ >= cV.
m_fZ );
1003 {
return IsContaining( b.
m_vStart ) && IsContaining( b.
m_vEnd ); };
1024 bool IsEmpty(
void )
const {
return m_vStart.x > m_vEnd.x; };
1059 unsigned int iIndex,
1060 bool bRightHand =
true
1067 unsigned int iIndex,
1068 unsigned int iSource = (
unsigned int)-1
1073 void Normalize(
void ) {
a.Normalize();
b.Normalize(); c.Normalize(); };
1114 virtual void Initialize(
const class Mesh *pMesh,
Store<unsigned int> aFaceList,
float fAClip,
float fBClip );
1115 virtual bool IsOutside(
const Vector &vPos,
float fRange )
const;
1130 _11(m._11), _12(m._12), _13(m._13), _14(m._14),
1131 _21(m._21), _22(m._22), _23(m._23), _24(m._24),
1132 _31(m._31), _32(m._32), _33(m._33), _34(m._34),
1133 _41(m._41), _42(m._42), _43(m._43), _44(m._44) {};
1136 Matrix(
float f11,
float f12,
float f13,
float f14,
1137 float f21,
float f22,
float f23,
float f24,
1138 float f31,
float f32,
float f33,
float f34,
1139 float f41,
float f42,
float f43,
float f44 ) :
1140 _11(f11), _12(f12), _13(f13), _14(f14),
1141 _21(f21), _22(f22), _23(f23), _24(f24),
1142 _31(f31), _32(f32), _33(f33), _34(f34),
1143 _41(f41), _42(f42), _43(f43), _44(f44) {};
1146 Matrix(
const double *pMatrix );
1151 return m_fData[iRow*4+iColumn];
1157 return m_fData[iRow*4+iColumn];
1162 operator const float *(
void )
const {
return m_fData; };
1166 operator float *(
void ) {
return m_fData; };
1169 Matrix &SetIdentity(
void );
1172 bool IsIdentity(
void )
const;
1175 bool IsRigid(
void )
const;
1178 Matrix &operator *=(
float );
1197 void SetRow(
int iRowIndex,
const Vector &vValue );
1200 Matrix &Transpose(
void );
1204 Matrix &Invert(
bool* pOk = 0 );
1211 Vector ToEuler(
void )
const;
1214 Matrix &FromAxisAngle(
const Vector &vAxis,
float fAngle );
1285 double m_fAlignDummy[8];
1286 #if !defined OS_32BIT
1287 __m128 m_vAlignDummy[4];
1311 { m_fW = fW; m_fX = vXYZ.
x; m_fY = vXYZ.
y; m_fZ = vXYZ.
z; };
1315 { m_fW = fW; m_fX = fX; m_fY = fY; m_fZ = fZ; };
1327 float LengthSquare(
void )
const;
1331 float Length(
void )
const;
1334 Matrix ToMatrix(
void )
const;
1343 {
return Quaternion( m_fW*fMultiplier, m_fX*fMultiplier, m_fY*fMultiplier, m_fZ*fMultiplier ); };
1347 { *
this =
operator *( fMultiplier );
return *
this; };
1351 {
return Quaternion( -m_fW, -m_fX, -m_fY, -m_fZ ); };
1391 { m_fW = 1.0; m_fX = m_fY = m_fZ = 0.0f; };
1394 void SetZero(
void ) { m_fW = m_fX = m_fY = m_fZ = 0.0f; };
1426 { m_vReal = vReal; m_vDual = vDual; };
1440 const Vector &vDirection,
1446 const Vector &vTranslation,
1454 Matrix ToMatrix(
void )
const;
1457 Vector Translation(
void )
const;
1489 void ToScrew(
float &fAngle,
float &fPitch,
Vector &vDirection,
Vector &vMoment )
const;
1513 void SetIdentity(
void ) { m_vReal.SetIdentity(); m_vDual.SetZero(); };
1537 Vector m_vStart, m_vEnd, m_vDirection;
1553 float RangeFrom(
const Vector &vPoint );
1567 IntersectionResult Intersection2D(
const Line& cOther,
Vector &vResult,
bool bSegmentOnly =
false );
1626 CheckableFloat(
bool bState,
float fValue ) { m_bState = bState; m_fValue = fValue; };
1632 float Value(
void )
const {
return m_fValue; };
1638 bool State(
void )
const {
return m_bState; };
1646 s == m_bState == m_fValue;
1663 { m_iSize =
sizeof(
CheckableFloat); m_sValueName = sValueName; };
1672 m_cValue.SetState( s.
section(
' ', 0, 0 ) ==
"true" ?
true : false );
1676 virtual void SetState(
bool bState,
bool bInternal =
false )
1678 m_cValue.SetState( bState );
1696 m_aValue[0] = 0; m_aValue[1] = 1;
1697 m_bComplementary =
false;
1703 bool State(
void )
const {
return s_bActive; };
1711 MB_ASSERT(fValue > fMin && fValue < fMax);
1712 m_aLabel[i] = sLabel;
1715 m_aValue[i] = fValue;
1718 unsigned int Size()
const {
return m_iSize; }
1730 s == s_bActive == m_iSize == m_bComplementary;
1731 for (
unsigned int i = 0; i < m_iSize; ++i)
1732 s == m_aLabel[i] == m_aMin[i] == m_aMax[i] == m_aValue[i];
1735 static bool s_bActive;
1773 static inline bool FloatEqual(
float A,
float B,
const int max_ulps = 4)
1778 if (a < 0) a = 0x80000000 -
a;
1779 if (b < 0) b = 0x80000000 -
b;
1780 return (abs(a - b) <= max_ulps);
1792 if (a < 0) a = 0x80000000 -
a;
1793 if (b < 0) b = 0x80000000 -
b;
1794 return (a - b) >= -max_ulps;
1810 #if defined(_MSC_VER)
1811 #pragma warning(pop)
float Volume(void) const
Returns the volume of the box.
Quaternion(void)
Constructs a quaternion which represents the identical transformation.
GLdouble GLdouble GLdouble r
AxisAlignedBoundingBox Intersection(const AxisAlignedBoundingBox &cOther) const
Returns the intersection between this box and cOther.
Vector Minimum(const Vector &o)
Returns the minimum of this and the argument vector.
unsigned int(APIENTRYP PFNGLXGETAGPOFFSETMESAPROC)(const void *pointer)
const QPoint operator/(const QPoint &p, qreal c)
static bool FloatGreaterOrEqual(float A, float B, const int max_ulps=4)
compares floats for >= with a tolerance expressed in Units of Least Precision.
void SetValueName(const QString &sValueName)
Represents a 3D vector or point with S23E8 floating point elements.
MBDLL_DECL AttributeWidget * CreateNewVector4Widget(QWidget *pParent, int iWidth, avector4 *pAttribute)
void SetState(bool b)
Sets the associated boolean value.
AttributeCheckableFloat acheckablefloat
A Mesh is a collection of vertices organized into faces, and optional Texture Coordinate information...
QString ValueName(void) const
QByteArray & operator+=(QByteArray &a, const QStringBuilder< A, B > &b)
Quaternion m_vReal
Content of the dual quaterion as two regular quaternions.
#define MB_ASSERT(condition)
Color Mix(const Color &c, float f) const
Mix two colors based on a scalar value which should be within the range 0 and 1.
QString arg(qlonglong a, int fieldwidth=0, int base=10, const QChar &fillChar=QLatin1Char(' ')) const Q_REQUIRED_RESULT
State
The state the media producing object is in at the moment.
GLfloat GLfloat GLfloat v2
DblVector(const short *pVector)
Construct the vector from a pointer to 16bit signed data.
void setRgbF(qreal r, qreal g, qreal b, qreal a=1.0)
virtual ~AttributeCheckableFloatArray(void)
Attribute::AttributeType Type(void) const
Returns the type of the attribute.
Vector4(float X, float Y, float Z, float W)
mudbox::Vector & operator<<(mudbox::Vector &v, const HWVector &r)
DualQuaternion & DoubleConjugate(void)
Conjugates the dual quaternion by both the quaternion and dual conjugation.
void SetComplementary(bool b)
DblVector(const char *pVector)
Construct the vector from a pointer to 8bit signed data.
void SetState(bool b)
Sets the associated boolean value.
AxisAlignedBoundingBox(void)
Creates an empty bounding box.
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
void Reset(void)
Makes the box empty.
DualQuaternion(void)
Constructs a dual quaternion which represents the identical transformation.
Represents a local coordinate basis comprising three axes that define a coordinate system...
Vector ProjectedTransform(const Vector &v, float fW=1.0f) const
Transforms a point (represented by a Vector) by the matrix and returns the result.
float AngleCos(const Vector &v1) const
Returns the cosine of the angle between this vector and the one passed in.
void SetZero(void)
Sets the quaternion to represents the zero transformation.
void SetFromString(const QString &s, bool=true, bool=false)
Sets the value of the attribute as a string.
Represents a bounding box whose axes are aligned with the coordinate system.
float Value(void) const
Retrieves the associated float value.
double AngleCos(const DblVector &v1) const
Returns the cosine of the angle between this vector and the one passed in.
DblVector Maximum(const DblVector &o)
Returns the maximum of this and the argument vector.
AttributeWidget * CreateEditorWidget(QWidget *pParent, int iWidth)
This function creates and returns the address of a QWidget object.
This is the base class for most classes in the Mudbox SDK.
The Quaternion class is used to represent rotations in most cases.
void Serialize(Stream &s)
virtual QString AsString(bool bLocalized=false) const
Returns the value of the attribute as a string.
Vector Maximum(const Vector &o)
Returns the maximum of this and the argument vector.
Quaternion(float fW, const Vector &vXYZ)
Constructs a quaternion by passing the real part as a scalar, and the rest as a vector.
static bool FloatLessOrEqual(float A, float B, const int max_ulps=4)
compares floats for <= with="" a="" tolerance="" expressed="" in="" units="" of="" least="" precision.="">=>
DblVector & Normalize(void)
Normalizes the vector and returns it.
float & operator()(int iRow, int iColumn)
Returns a reference to a specific element in the matrix.
void Set(float fRed, float fGreen, float fBlue, float fAlpha=1.0f)
Sets the current value of the color.
AttributeWidget * CreateEditorWidget(QWidget *pParent, int iWidth)
This function creates and returns the address of a QWidget object.
bool operator==(const Attribute &cA, const AttributeInstance< type > &cB)
This operator compares the two attributes and NOT their values.
Q_CORE_EXPORT QBitArray operator&(const QBitArray &, const QBitArray &)
bool IsTouching(const AxisAlignedBoundingBox &cBB) const
Returns true if the two boxes intersect at all.
float YSize(void) const
Returns the length of the box along the Y axis.
Represents a color with four components: red, green, blue, alpha.
The DualQuaternion class is used to represent rigid transformations in most cases.
Value of an attribute is changed.
void SetValue(float f)
Sets the associated float value.
AttributeInstance< Color > acolor
Vector & RotateOrthogonal(const Vector &vBase)
Rotates this vector to be orthogonal to vBase without changing its length, and returns it...
virtual void SetFromString(const QString &sValue, bool bInternal=true, bool=false)
Sets the value of the attribute as a string.
Vector Transform(const Vector &v, float fW, float &fRW) const
Transforms a point (represented by a Vector) by the matrix, and returns all four homogeneous coordina...
bool IsComplementary() const
the return value is true when the second range is [0, m_aMax[0] - m_aValue[0]].
Vector(float fX, float fY, float fZ=0.0f)
Constructs the vector with specified values.
DualQuaternion(const Quaternion &vReal, const Quaternion &vDual)
Constructs a dual quaternion from two quaternions, using one as the real and the other one as the dua...
MBDLL_DECL AttributeWidget * CreateNewVectorWidget(QWidget *pParent, int iWidth, avector *pAttribute)
A container class that holds a boolean and a float value.
AttributeCheckableFloatArray(Node *pOwner=0, const QString &sID="")
DblVector(double fX, double fY, double fZ=0.0)
Constructs the vector with specified values.
unsigned int Size() const
MBDLL_DECL Vector operator*(const Matrix &m, const Vector &v)
void Extend(const Vector &cV)
Extends the box to contain the passed point.
Matrix(void)
Construct a matrix without initializing its elements. The values stored in the matrix are undefined...
This base class represents any shape in 3d space.
void AddElement(unsigned int i, QString sLabel, float fMin, float fMax, float fValue)
Vector TransformDirection(const Vector &v) const
Transform a direction vector by the matrix.
DblVector(void)
Constructs the vector with zero values.
This class represents a 4x4 transformation matrix.
float & operator[](unsigned int iChannel)
Returns a color component based on its index.
Vector & Set(float fX, float fY, float fZ)
Sets the values of the vector elements and returns the vector.
This is a generic attribute which can be used instead of the standard built in types.
float operator()(int iRow, int iColumn) const
Returns the value of a specific element in the matrix.
AttributeInstance< Vector > avector
A four dimensionsional vector (X, Y, Z, and W)
bool IsContaining(const AxisAlignedBoundingBox &b) const
Returns true if the box contains the specified box.
const QByteArray operator+(const QByteArray &a1, const QByteArray &a2)
float LengthSquare(void) const
Returns the square of the length of the vector.
Attribute::AttributeType Type(void) const
Returns the type of the attribute.
Quaternion(float fW, float fX, float fY, float fZ)
Constructs a quaternion by passing all the four components as a scalar.
DblVector(const DblVector &vVector)
Copy constructor.
float Size(void) const
Returns the maximum edge length of the box.
Vector & Clear(void)
Zeros all the components of the Vector, then returns it.
AttributeInstance< Vector4 > avector4
double LengthSquare(void) const
Returns the square of the length of the DblVector.
Matrix(float f11, float f12, float f13, float f14, float f21, float f22, float f23, float f24, float f31, float f32, float f33, float f34, float f41, float f42, float f43, float f44)
Construct the matrix by passing all the 16 values.
Represents a line segment in 3d space.
bool operator!=(const QByteArray &a1, const QByteArray &a2)
CheckableFloat(bool bState, float fValue)
Vector & Normalize(void)
Normalizes the vector and returns it.
AttributeInstance< Matrix > amatrix
This attribute class represents a 4x4 transformation matrix.
void Serialize(Stream &s)
DblVector & Clear(void)
Zeros all the components of the Vector, then returns it.
virtual void SetState(bool bState, bool bInternal=false)
Vector Center(void) const
Returns the center of the box.
float Luminance() const
Returns the luminance value for the color.
void SetValue(unsigned int i, float v)
Vector Transform(const Vector &v, float fW=1.0f) const
Transforms a vector by the matrix and returns the result.
bool IsContaining(const Vector &cV) const
Returns true if the box contains the specified point.
MBDLL_DECL Vector operator*(float f, const Vector &v)
Multiplies a float scalar value by a vector, the result is a vector.
AxisAlignedBoundingBox(const AxisAlignedBoundingBox &cA)
Creates an object by cloning another one.
AxisAlignedBoundingBox(const Vector &vStart, const Vector &vEnd)
Creates an object by specifying two corners of the box.
Class: ConvolutionKernel.
Vector(const char *pVector)
Construct the vector from a pointer to 8bit signed data.
QString section(QChar sep, int start, int end=-1, SectionFlags flags=SectionDefault) const
GLubyte GLubyte GLubyte a
float Value(unsigned int i) const
AttributeType
Type of the attribute.
float DistanceSquareFrom(const Vector &v) const
Returns the square of the distance between two points (this and another, represented as Vector object...
Vector, 3xfloat, see Vector.
DblVector Minimum(const DblVector &o)
Returns the minimum of this and the argument vector.
float XSize(void) const
Returns the length of the box along the X axis.
IntersectionResult
Possible return values of computing intersection of 2 lines.
const QPoint operator-(const QPoint &p1, const QPoint &p2)
bool IsEmpty(void) const
Returns true if the box is empy.
DblVector & Set(double fX, double fY, double fZ)
Sets the values of the vector elements and returns the vector.
This class will be removed from the SDK.
bool IsPartOf(const AxisAlignedBoundingBox &cBB) const
Returns true if the passed-in box contains this box.
Streams are used to read information from a file, or to write it to a file.
#define DECLARE_CLASS
This macro should be used in declaration of classes which are inherited from the Node class (or any d...
AttributeCheckableFloat(Node *pOwner=0, const QString &sID="", const QString &sValueName="")
bool State(void) const
Retrieves the associated boolean value.
void SetIdentity(void)
Sets the quaternion to represents the identical transformation.
MBDLL_DECL AttributeWidget * CreateNewCheckableFloatWidget(QWidget *pParent, int iWidth, AttributeCheckableFloat *pAttribute)
Q_CORE_EXPORT QBitArray operator|(const QBitArray &, const QBitArray &)
void Extend(const AxisAlignedBoundingBox &bb)
Extends the box to contain another one.
void ExpandBy(float f)
Expands the AABB by a specified amount in all directions.
void SetIdentity(void)
Sets the dual quaternion to represents the identical transformaion.
GLubyte GLubyte GLubyte GLubyte w
MBDLL_DECL AttributeWidget * CreateNewCheckableFloatArrayWidget(QWidget *pParent, int iWidth, class AttributeCheckableFloatArray *pAttribute)
Vector(const short *pVector)
Construct the vector from a pointer to 16bit signed data.
QString AsString(bool) const
Returns the value of the attribute as a string.
void Normalize(void)
Normalize all the three axes.
GLfloat GLfloat GLfloat GLfloat v3
Vector(const Vector &vVector)
Copy constructor.
Vector(void)
Constructs the vector with zero values.
static bool FloatEqual(float A, float B, const int max_ulps=4)
compares floats for equality with a tolerance expressed in Units of Least Precision.
Represents a 3D vector or point with S56E11 floating point elements.
float toFloat(bool *ok=0) const
MBDLL_DECL AttributeWidget * CreateNewColorWidget(QWidget *pParent, int iWidth, acolor *pAttribute)
Attribute::AttributeType Type(void) const
Returns the type of the attribute.
AttributeWidget * CreateEditorWidget(QWidget *pParent, int iWidth)
This function creates and returns the address of a QWidget object.
float ZSize(void) const
Returns the length of the box along the Y axis.
DblVector(const Vector &vVector)
constructor from single precision vector.
AxisAlignedBoundingBox(const Vector &vCenter, float fSize)
Creates an object by specifying the center of it and the distance of the sides from the center...
Color(float fRed=1.0f, float fGreen=1.0f, float fBlue=1.0f, float fAlpha=1.0f)
Constructs a color object with specified values.
bool State(void) const
Retrieves the associated boolean value.