[Aqsis-commits] [SCM] Aqsis Renderer branch, math, updated. Release_1.6.0_Phase2-140-g411f87a
Brought to you by:
ltatkinson,
pgregory
From: Paul G. <pgr...@us...> - 2010-02-15 14:52:14
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Aqsis Renderer". The branch, math has been updated via 411f87a96e831b27e1c9d26a531b3fcc27b4d725 (commit) via a6c365c7ecca0fcf7ad05f42fb383d77f5bf95d2 (commit) via 98f65d720fa91ba059717fabec078302bfb252ee (commit) from f7e92dd501163a3e40e4b6d86e35d18a02e8827d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 411f87a96e831b27e1c9d26a531b3fcc27b4d725 Author: Paul Gregory <pgr...@aq...> Date: Mon Feb 15 14:49:57 2010 +0000 Fix an error in the CqVector3D refactor. * The use of the '*' operator in IntersectLine for quadric boundary calculation had been badly translated to Imath::V3f. diff --git a/libs/core/geometry/quadrics.cpp b/libs/core/geometry/quadrics.cpp index 875d7d4..bb44798 100644 --- a/libs/core/geometry/quadrics.cpp +++ b/libs/core/geometry/quadrics.cpp @@ -1541,7 +1541,7 @@ bool IntersectLine( Imath::V3f& P1, Imath::V3f& T1, Imath::V3f& P2, Imath::V3f& if ( ( vw * vw ) < 1.0e-07 ) return ( false ); t /= vw; - P = P2 + ( ( ( P1 - P2 ) * v ) / vw ) * T2 ; + P = P2 + ( ( ( P1 - P2 ).dot(v) ) / vw ) * T2 ; return ( true ); } commit a6c365c7ecca0fcf7ad05f42fb383d77f5bf95d2 Author: Paul Gregory <pgr...@aq...> Date: Sun Feb 14 23:42:02 2010 +0000 Fix error introduced in the CqVector2D refactor. * There was an error in the reworking of the dofOffset calculation, resulting in all Dof tests failing. diff --git a/libs/core/imagepixel.cpp b/libs/core/imagepixel.cpp index 7587159..42fcdb5 100644 --- a/libs/core/imagepixel.cpp +++ b/libs/core/imagepixel.cpp @@ -354,7 +354,7 @@ void CqImagePixel::setSamples(IqSampler* sampler, Imath::V2f& offset) m_samples[i].position = offset + positions[i]; m_samples[i].time = ( closetime - opentime ) * times[i] + opentime; m_samples[i].detailLevel = lods[i]; - m_samples[m_DofOffsetIndices[i]].dofOffset = projectToCircle( Imath::V2f(-1) + dofOffsets[i]) * 2; + m_samples[m_DofOffsetIndices[i]].dofOffset = projectToCircle( Imath::V2f(-1) + (dofOffsets[i] * 2)); } } commit 98f65d720fa91ba059717fabec078302bfb252ee Author: Paul Gregory <pgr...@aq...> Date: Wed Feb 10 19:36:16 2010 +0000 First phase CqVector3D removal. * Temporarily committed for security. diff --git a/include/aqsis/core/iattributes.h b/include/aqsis/core/iattributes.h index 4962b91..b35c633 100644 --- a/include/aqsis/core/iattributes.h +++ b/include/aqsis/core/iattributes.h @@ -52,13 +52,13 @@ struct IqAttributes virtual const CqString* GetStringAttribute( const char* strName, const char* strParam ) const = 0; /** Get a named point attribute as read only */ - virtual const CqVector3D* GetPointAttribute( const char* strName, const char* strParam ) const = 0; + virtual const Imath::V3f* GetPointAttribute( const char* strName, const char* strParam ) const = 0; /** Get a named point attribute as read only */ - virtual const CqVector3D* GetVectorAttribute( const char* strName, const char* strParam ) const = 0; + virtual const Imath::V3f* GetVectorAttribute( const char* strName, const char* strParam ) const = 0; /** Get a named point attribute as read only */ - virtual const CqVector3D* GetNormalAttribute( const char* strName, const char* strParam ) const = 0; + virtual const Imath::V3f* GetNormalAttribute( const char* strName, const char* strParam ) const = 0; /** Get a named color attribute as read only */ virtual const CqColor* GetColorAttribute( const char* strName, const char* strParam ) const = 0; @@ -77,13 +77,13 @@ struct IqAttributes virtual CqString* GetStringAttributeWrite( const char* strName, const char* strParam ) = 0; /** Get a named point attribute as writable */ - virtual CqVector3D* GetPointAttributeWrite( const char* strName, const char* strParam ) = 0; + virtual Imath::V3f* GetPointAttributeWrite( const char* strName, const char* strParam ) = 0; /** Get a named point attribute as writable */ - virtual CqVector3D* GetVectorAttributeWrite( const char* strName, const char* strParam ) = 0; + virtual Imath::V3f* GetVectorAttributeWrite( const char* strName, const char* strParam ) = 0; /** Get a named point attribute as writable */ - virtual CqVector3D* GetNormalAttributeWrite( const char* strName, const char* strParam ) = 0; + virtual Imath::V3f* GetNormalAttributeWrite( const char* strName, const char* strParam ) = 0; /** Get a named color attribute as writable */ virtual CqColor* GetColorAttributeWrite( const char* strName, const char* strParam ) = 0; diff --git a/include/aqsis/core/ioptions.h b/include/aqsis/core/ioptions.h index 4494609..2f147b7 100644 --- a/include/aqsis/core/ioptions.h +++ b/include/aqsis/core/ioptions.h @@ -34,6 +34,7 @@ #include <aqsis/riutil/primvartype.h> #include <aqsis/ri/ritypes.h> #include <aqsis/math/vecfwd.h> +#include <ImathVec.h> namespace Aqsis { @@ -88,13 +89,13 @@ struct IqOptions virtual const TqFloat* GetFloatOption( const char* strName, const char* strParam ) const = 0; virtual const TqInt* GetIntegerOption( const char* strName, const char* strParam ) const = 0; virtual const CqString* GetStringOption( const char* strName, const char* strParam ) const = 0; - virtual const CqVector3D* GetPointOption( const char* strName, const char* strParam ) const = 0; + virtual const Imath::V3f* GetPointOption( const char* strName, const char* strParam ) const = 0; virtual const CqColor* GetColorOption( const char* strName, const char* strParam ) const = 0; virtual TqFloat* GetFloatOptionWrite( const char* strName, const char* strParam, TqInt arraySize = 1 ) = 0; virtual TqInt* GetIntegerOptionWrite( const char* strName, const char* strParam, TqInt arraySize = 1 ) = 0; virtual CqString* GetStringOptionWrite( const char* strName, const char* strParam, TqInt arraySize = 1 ) = 0; - virtual CqVector3D* GetPointOptionWrite( const char* strName, const char* strParam, TqInt arraySize = 1 ) = 0; + virtual Imath::V3f* GetPointOptionWrite( const char* strName, const char* strParam, TqInt arraySize = 1 ) = 0; virtual CqColor* GetColorOptionWrite( const char* strName, const char* strParam, TqInt arraySize = 1 ) = 0; virtual EqVariableType getParameterType(const char* strName, const char* strParam) const = 0; diff --git a/include/aqsis/core/irenderer.h b/include/aqsis/core/irenderer.h index c9e5002..f12eb4a 100644 --- a/include/aqsis/core/irenderer.h +++ b/include/aqsis/core/irenderer.h @@ -43,13 +43,13 @@ struct IqRenderer virtual const TqFloat* GetFloatOption( const char* strName, const char* strParam ) const = 0; virtual const TqInt* GetIntegerOption( const char* strName, const char* strParam ) const = 0; virtual const CqString* GetStringOption( const char* strName, const char* strParam ) const = 0; - virtual const CqVector3D* GetPointOption( const char* strName, const char* strParam ) const = 0; + virtual const Imath::V3f* GetPointOption( const char* strName, const char* strParam ) const = 0; virtual const CqColor* GetColorOption( const char* strName, const char* strParam ) const = 0; virtual TqFloat* GetFloatOptionWrite( const char* strName, const char* strParam ) = 0; virtual TqInt* GetIntegerOptionWrite( const char* strName, const char* strParam ) = 0; virtual CqString* GetStringOptionWrite( const char* strName, const char* strParam ) = 0; - virtual CqVector3D* GetPointOptionWrite( const char* strName, const char* strParam ) = 0; + virtual Imath::V3f* GetPointOptionWrite( const char* strName, const char* strParam ) = 0; virtual CqColor* GetColorOptionWrite( const char* strName, const char* strParam ) = 0; diff --git a/include/aqsis/math/cellnoise.h b/include/aqsis/math/cellnoise.h index 0c9aed2..ef7540b 100644 --- a/include/aqsis/math/cellnoise.h +++ b/include/aqsis/math/cellnoise.h @@ -49,13 +49,13 @@ class AQSIS_MATH_SHARE CqCellNoise TqFloat FCellNoise1( TqFloat u ); TqFloat FCellNoise2( TqFloat u, TqFloat v ); - TqFloat FCellNoise3( const CqVector3D& P ); - TqFloat FCellNoise4( const CqVector3D& P, TqFloat v ); + TqFloat FCellNoise3( const Imath::V3f& P ); + TqFloat FCellNoise4( const Imath::V3f& P, TqFloat v ); - CqVector3D PCellNoise1( TqFloat u ); - CqVector3D PCellNoise2( TqFloat u, TqFloat v ); - CqVector3D PCellNoise3( const CqVector3D& P ); - CqVector3D PCellNoise4( const CqVector3D& P, TqFloat v ); + Imath::V3f PCellNoise1( TqFloat u ); + Imath::V3f PCellNoise2( TqFloat u, TqFloat v ); + Imath::V3f PCellNoise3( const Imath::V3f& P ); + Imath::V3f PCellNoise4( const Imath::V3f& P, TqFloat v ); private: static TqInt m_PermuteTable[ 2*2048 ]; ///< static permutation table. diff --git a/include/aqsis/math/derivatives.h b/include/aqsis/math/derivatives.h index b4856f0..f58d1bf 100644 --- a/include/aqsis/math/derivatives.h +++ b/include/aqsis/math/derivatives.h @@ -178,11 +178,11 @@ inline T CqGridDiff::diff(const T* data, bool useCentred, TqInt stride, // increasing in different directions, which this is // unavoidable for some surface types like SDS. if(n == 0) - return -1.5*data[0] + 2*data[stride] - 0.5*data[2*stride]; + return data[0]*-1.5 + data[stride]*2 - data[2*stride]*0.5; else if(n == nSize-1) - return 1.5*data[0] - 2*data[-1*stride] + 0.5*data[-2*stride]; + return data[0]*1.5 - data[-1*stride]*2 + data[-2*stride]*0.5; else - return 0.5*(data[stride] - data[-stride]); + return (data[stride] - data[-stride])*0.5; } else { @@ -192,9 +192,9 @@ inline T CqGridDiff::diff(const T* data, bool useCentred, TqInt stride, // differece *between* grid points, which corresponds to // micropolygons centres. if(n == nSize-1) - return 0.5*(data[0] - data[-stride]); + return (data[0] - data[-stride])*0.5; else - return 0.5*(data[stride] - data[0]); + return (data[stride] - data[0])*0.5; } } diff --git a/include/aqsis/math/matrix.h b/include/aqsis/math/matrix.h index 7429024..a918804 100644 --- a/include/aqsis/math/matrix.h +++ b/include/aqsis/math/matrix.h @@ -34,6 +34,8 @@ #include <aqsis/math/vector3d.h> #include <aqsis/math/vector4d.h> +#include <aqsis/math/vectorcast.h> +#include <ImathVec.h> namespace Aqsis { @@ -69,12 +71,14 @@ class AQSIS_MATH_SHARE CqMatrix * \param trans - The vector by which to translate. */ CqMatrix( const CqVector3D& trans ); + CqMatrix( const Imath::V3f& trans ); /** \brief Rotation matrix constructor * * \param angle - The angle to rotate by. * \param axis - The axis about which to rotate. */ CqMatrix( const TqFloat angle, const CqVector3D axis ); + CqMatrix( const TqFloat angle, const Imath::V3f axis ); /** \brief Skew matrix constructor * * \param angle @@ -143,10 +147,12 @@ class AQSIS_MATH_SHARE CqMatrix * \param axis - The axis about which to rotate. */ void Rotate( const TqFloat angle, const CqVector3D axis ); + void Rotate( const TqFloat angle, const Imath::V3f axis ); /** Translates this matrix by a given vector. * \param trans - The vector by which to translate. */ void Translate( const CqVector3D& trans ); + void Translate( const Imath::V3f& trans ); /** Translates this matrix by three axis distances. * \param xt - X distance to translate. * \param yt - Y distance to translate. @@ -257,6 +263,7 @@ class AQSIS_MATH_SHARE CqMatrix * \param vec - The vector to multiply. */ CqVector3D operator*(const CqVector3D &vec) const; + Imath::V3f operator*(const Imath::V3f &vec) const; /** \brief Add two matrices. * \param from - The matrix to add. * \return Result of adding from to this matrix. @@ -418,6 +425,20 @@ inline CqMatrix::CqMatrix( const CqVector3D& trans ) m_elements[ 3 ][ 2 ] = trans.z(); } } +inline CqMatrix::CqMatrix( const Imath::V3f& trans) +{ + Identity(); + + if( trans.x != 0.0f || trans.y != 0.0f || trans.z != 0.0f ) + { + m_fIdentity = false; + + m_elements[ 3 ][ 0 ] = trans.x; + m_elements[ 3 ][ 1 ] = trans.y; + m_elements[ 3 ][ 2 ] = trans.z; + } +} + // Construct a rotation matrix inline CqMatrix::CqMatrix( const TqFloat angle, const CqVector3D axis ) @@ -427,6 +448,13 @@ inline CqMatrix::CqMatrix( const TqFloat angle, const CqVector3D axis ) if ( angle != 0.0f && axis.Magnitude() != 0.0f ) Rotate( angle, axis ); } +inline CqMatrix::CqMatrix( const TqFloat angle, const Imath::V3f axis ) +{ + Identity(); + + if ( angle != 0.0f && axis.length() != 0.0f ) + Rotate( angle, axis ); +} inline CqMatrix::CqMatrix( const CqMatrix &from ) { @@ -537,6 +565,11 @@ inline void CqMatrix::Translate( const CqVector3D& trans ) CqMatrix matTrans( trans ); this->PreMultiply( matTrans ); } +inline void CqMatrix::Translate( const Imath::V3f& trans ) +{ + CqMatrix matTrans( trans ); + this->PreMultiply( matTrans ); +} inline void CqMatrix::Translate( const TqFloat xt, const TqFloat yt, const TqFloat zt ) { @@ -736,6 +769,10 @@ inline CqVector3D CqMatrix::operator*( const CqVector3D &vec ) const return Result; } +inline Imath::V3f CqMatrix::operator*( const Imath::V3f& vec) const +{ + return vectorCast<Imath::V3f>(operator*(vectorCast<CqVector3D>(vec))); +} inline CqMatrix CqMatrix::operator+( const CqMatrix &from ) const { diff --git a/include/aqsis/math/noise.h b/include/aqsis/math/noise.h index a9ad93e..c9a0d9a 100644 --- a/include/aqsis/math/noise.h +++ b/include/aqsis/math/noise.h @@ -57,26 +57,26 @@ class AQSIS_MATH_SHARE CqNoise static TqFloat FGPNoise1( TqFloat x, TqFloat px ); static TqFloat FGNoise2( TqFloat x, TqFloat y ); static TqFloat FGPNoise2( TqFloat x, TqFloat y, TqFloat px, TqFloat py ); - static TqFloat FGNoise3( const CqVector3D& v ); - static TqFloat FGPNoise3( const CqVector3D& v, const CqVector3D& pv ); - static TqFloat FGNoise4( const CqVector3D& v, const TqFloat t ); - static TqFloat FGPNoise4( const CqVector3D& v, const TqFloat t, const CqVector3D& pv, const TqFloat pt ); - static CqVector3D PGNoise1( TqFloat x ); - static CqVector3D PGPNoise1( TqFloat x, TqFloat px ); - static CqVector3D PGNoise2( TqFloat x, TqFloat y ); - static CqVector3D PGPNoise2( TqFloat x, TqFloat y, TqFloat px, TqFloat py ); - static CqVector3D PGNoise3( const CqVector3D& v ); - static CqVector3D PGPNoise3( const CqVector3D& v, const CqVector3D& pv ); - static CqVector3D PGNoise4( const CqVector3D& v, TqFloat t ); - static CqVector3D PGPNoise4( const CqVector3D& v, TqFloat t, const CqVector3D& pv, TqFloat pt ); + static TqFloat FGNoise3( const Imath::V3f& v ); + static TqFloat FGPNoise3( const Imath::V3f& v, const Imath::V3f& pv ); + static TqFloat FGNoise4( const Imath::V3f& v, const TqFloat t ); + static TqFloat FGPNoise4( const Imath::V3f& v, const TqFloat t, const Imath::V3f& pv, const TqFloat pt ); + static Imath::V3f PGNoise1( TqFloat x ); + static Imath::V3f PGPNoise1( TqFloat x, TqFloat px ); + static Imath::V3f PGNoise2( TqFloat x, TqFloat y ); + static Imath::V3f PGPNoise2( TqFloat x, TqFloat y, TqFloat px, TqFloat py ); + static Imath::V3f PGNoise3( const Imath::V3f& v ); + static Imath::V3f PGPNoise3( const Imath::V3f& v, const Imath::V3f& pv ); + static Imath::V3f PGNoise4( const Imath::V3f& v, TqFloat t ); + static Imath::V3f PGPNoise4( const Imath::V3f& v, TqFloat t, const Imath::V3f& pv, TqFloat pt ); static CqColor CGNoise1( TqFloat x ); static CqColor CGPNoise1( TqFloat x, TqFloat px ); static CqColor CGNoise2( TqFloat x, TqFloat y ); static CqColor CGPNoise2( TqFloat x, TqFloat y, TqFloat px, TqFloat py ); - static CqColor CGNoise3( const CqVector3D& v ); - static CqColor CGPNoise3( const CqVector3D& v, const CqVector3D& pv ); - static CqColor CGNoise4( const CqVector3D& v, TqFloat t ); - static CqColor CGPNoise4( const CqVector3D& v, TqFloat t, const CqVector3D& pv, TqFloat pt ); + static CqColor CGNoise3( const Imath::V3f& v ); + static CqColor CGPNoise3( const Imath::V3f& v, const Imath::V3f& pv ); + static CqColor CGNoise4( const Imath::V3f& v, TqFloat t ); + static CqColor CGPNoise4( const Imath::V3f& v, TqFloat t, const Imath::V3f& pv, TqFloat pt ); }; diff --git a/include/aqsis/math/vector3d.h b/include/aqsis/math/vector3d.h index 5485a1f..516f4e3 100644 --- a/include/aqsis/math/vector3d.h +++ b/include/aqsis/math/vector3d.h @@ -36,6 +36,7 @@ #include <aqsis/math/math.h> #include <aqsis/math/vecfwd.h> #include <aqsis/math/vectorstorage.h> +#include <ImathVec.h> namespace Aqsis { @@ -632,6 +633,68 @@ inline bool isClose(const CqBasicVec3<T1>& v1, const CqBasicVec3<T2>& v2, TqFloa //----------------------------------------------------------------------- +// + +inline bool operator<(const Imath::V3f& v1, const Imath::V3f& v2) +{ + return (v1.x < v2.x) && (v1.y < v2.y) && (v1.z < v2.z); +} + +inline bool operator<=(const Imath::V3f& v1, const Imath::V3f& v2) +{ + return (v1.x <= v2.x) && (v1.y <= v2.y) && (v1.z <= v2.z); +} + +inline bool operator>(const Imath::V3f& v1, const Imath::V3f& v2) +{ + return (v1.x > v2.x) && (v1.y > v2.y) && (v1.z > v2.z); +} + +inline bool operator>=(const Imath::V3f& v1, const Imath::V3f& v2) +{ + return (v1.x >= v2.x) && (v1.y >= v2.y) && (v1.z >= v2.z); +} + +inline Imath::V3f operator/(TqFloat f, const Imath::V3f& v) +{ + return Imath::V3f(f/v.x, f/v.y, f/v.z); +} + +inline Imath::V3f operator+(TqFloat f, const Imath::V3f& v) +{ + return Imath::V3f(f+v.x, f+v.y, f+v.z); +} + +inline Imath::V3f operator-(TqFloat f, const Imath::V3f& v) +{ + return Imath::V3f(f-v.x, f-v.y, f-v.z); +} + + +inline Imath::V3f min(const Imath::V3f& a, const Imath::V3f& b) +{ + return Imath::V3f(min(a.x, b.x), min(a.y, b.y), min(a.z, b.z)); +} + +inline Imath::V3f max(const Imath::V3f& a, const Imath::V3f& b) +{ + return Imath::V3f(max(a.x, b.x), max(a.y, b.y), max(a.z, b.z)); +} + +inline Imath::V3f clamp(const Imath::V3f& v, const Imath::V3f& min, + const Imath::V3f& max) +{ + return Imath::V3f(clamp(v.x, min.x, max.x), + clamp(v.y, min.y, max.y), + clamp(v.z, min.z, max.z)); +} + +inline Imath::V3f lerp(TqFloat t, const Imath::V3f& v0, const Imath::V3f& v1) +{ + return Imath::V3f((1-t)*v0.x + t*v1.x, + (1-t)*v0.y + t*v1.y, + (1-t)*v0.z + t*v1.z); +} } // namespace Aqsis diff --git a/include/aqsis/math/vectorcast.h b/include/aqsis/math/vectorcast.h index 766c805..eb1c028 100644 --- a/include/aqsis/math/vectorcast.h +++ b/include/aqsis/math/vectorcast.h @@ -87,6 +87,12 @@ inline CqVector3D vectorCast(const CqVector2D& v) } template<> +inline Imath::V3f vectorCast(const CqVector2D& v) +{ + return Imath::V3f(v.x(), v.y(), 0); +} + +template<> inline Imath::V2f vectorCast(const CqVector2D& v) { return Imath::V2f(v.x(), v.y()); @@ -124,6 +130,11 @@ inline CqVector4D vectorCast(const CqVector3D& v) return CqVector4D(v.x(), v.y(), v.z()); } +template<> +inline Imath::V3f vectorCast(const CqVector3D& v) +{ + return Imath::V3f(v.x(), v.y(), v.z()); +} //---------------------------------------- // casting from CqVector4D @@ -148,6 +159,20 @@ inline CqVector3D vectorCast(const CqVector4D& v) } template<> +inline Imath::V3f vectorCast(const CqVector4D& v) +{ + if(v.h() != 1) + { + TqFloat hInv = 1/v.h(); + return Imath::V3f(hInv*v.x(), hInv*v.y(), hInv*v.z()); + } + else + { + return Imath::V3f(v.x(), v.y(), v.z()); + } +} + +template<> inline CqVector2D vectorCast(const CqVector4D& v) { if(v.h() != 1) @@ -189,6 +214,12 @@ inline CqVector3D vectorCast(const CqColor& c) return CqVector3D(c.r(), c.g(), c.b()); } +template<> +inline Imath::V3f vectorCast(const CqColor& c) +{ + return Imath::V3f(c.r(), c.g(), c.b()); +} + //---------------------------------------- // Casting from Imath::V2f @@ -205,11 +236,52 @@ inline CqVector2D vectorCast(const Imath::V2f& v) } template<> -inline CqVector3D vectorCast(const Imath::V2f& v) +inline Imath::V3f vectorCast(const Imath::V2f& v) +{ + return Imath::V3f(v.x, v.y, 0); +} + + +//---------------------------------------- +// Casting from Imath::V3f + +template<typename T> +inline T vectorCast(const Imath::V3f& v) +{ + return T(v); +} + +template<> +inline CqVector2D vectorCast(const Imath::V3f& v) +{ + return CqVector2D(v.x, v.y); +} + +template<> +inline Imath::V2f vectorCast(const Imath::V3f& v) { - return CqVector3D(v.x, v.y, 0); + return Imath::V2f(v.x, v.y); } +template<> +inline CqVector3D vectorCast(const Imath::V3f& v) +{ + return CqVector3D(v.x, v.y, v.z); +} + +template<> +inline CqVector4D vectorCast(const Imath::V3f& v) +{ + return CqVector4D(v.x, v.y, v.z); +} + +template<> +inline CqColor vectorCast(const Imath::V3f& v) +{ + return CqColor(v.x, v.y, v.z); +} + + } // namespace Aqsis #endif // VECTORCAST_H_INCLUDED diff --git a/include/aqsis/shadervm/ishaderdata.h b/include/aqsis/shadervm/ishaderdata.h index 6880bc6..5ff4c2f 100644 --- a/include/aqsis/shadervm/ishaderdata.h +++ b/include/aqsis/shadervm/ishaderdata.h @@ -51,11 +51,11 @@ struct IqShaderData /// Get the data as a string.. virtual void GetString( CqString& res, TqInt index = 0 ) const = 0; /// Get the data as a point.. - virtual void GetPoint( CqVector3D& res, TqInt index = 0 ) const = 0; + virtual void GetPoint( Imath::V3f& res, TqInt index = 0 ) const = 0; /// Get the data as a vector.. - virtual void GetVector( CqVector3D& res, TqInt index = 0 ) const = 0; + virtual void GetVector( Imath::V3f& res, TqInt index = 0 ) const = 0; /// Get the data as a normal.. - virtual void GetNormal( CqVector3D& res, TqInt index = 0 ) const = 0; + virtual void GetNormal( Imath::V3f& res, TqInt index = 0 ) const = 0; /// Get the data as a color.. virtual void GetColor( CqColor& res, TqInt index = 0 ) const = 0; /// Get the data as a matrix.. @@ -68,11 +68,11 @@ struct IqShaderData /// Get a const pointer to the data as a string.. virtual void GetStringPtr( const CqString*& res ) const = 0; /// Get a const pointer to the data as a point.. - virtual void GetPointPtr( const CqVector3D*& res ) const = 0; + virtual void GetPointPtr( const Imath::V3f*& res ) const = 0; /// Get a const pointer to the data as a vector.. - virtual void GetVectorPtr( const CqVector3D*& res ) const = 0; + virtual void GetVectorPtr( const Imath::V3f*& res ) const = 0; /// Get a const pointer to the data as a normal.. - virtual void GetNormalPtr( const CqVector3D*& res ) const = 0; + virtual void GetNormalPtr( const Imath::V3f*& res ) const = 0; /// Get a const pointer to the data as a color.. virtual void GetColorPtr( const CqColor*& res ) const = 0; /// Get a const pointer to the data as a matrix.. @@ -85,11 +85,11 @@ struct IqShaderData /// Get a pointer to the data as a string.. virtual void GetStringPtr( CqString*& res ) = 0; /// Get a pointer to the data as a point.. - virtual void GetPointPtr( CqVector3D*& res ) = 0; + virtual void GetPointPtr( Imath::V3f*& res ) = 0; /// Get a pointer to the data as a vector.. - virtual void GetVectorPtr( CqVector3D*& res ) = 0; + virtual void GetVectorPtr( Imath::V3f*& res ) = 0; /// Get a pointer to the data as a normal.. - virtual void GetNormalPtr( CqVector3D*& res ) = 0; + virtual void GetNormalPtr( Imath::V3f*& res ) = 0; /// Get a pointer to the data as a color.. virtual void GetColorPtr( CqColor*& res ) = 0; /// Get a pointer to the data as a matrix.. @@ -102,11 +102,11 @@ struct IqShaderData /// Set the value to the specified string. virtual void SetString( const CqString& val ) = 0; /// Set the value to the specified point. - virtual void SetPoint( const CqVector3D& val ) = 0; + virtual void SetPoint( const Imath::V3f& val ) = 0; /// Set the value to the specified vector. - virtual void SetVector( const CqVector3D& val ) = 0; + virtual void SetVector( const Imath::V3f& val ) = 0; /// Set the value to the specified normal. - virtual void SetNormal( const CqVector3D& val ) = 0; + virtual void SetNormal( const Imath::V3f& val ) = 0; /// Set the value to the specified color. virtual void SetColor( const CqColor& val ) = 0; /// Set the value to the specified matrix. @@ -119,11 +119,11 @@ struct IqShaderData /// Set the value to the specified string. virtual void SetString( const CqString& val, TqInt index ) = 0; /// Set the value to the specified point. - virtual void SetPoint( const CqVector3D& val, TqInt index ) = 0; + virtual void SetPoint( const Imath::V3f& val, TqInt index ) = 0; /// Set the value to the specified vector. - virtual void SetVector( const CqVector3D& val, TqInt index ) = 0; + virtual void SetVector( const Imath::V3f& val, TqInt index ) = 0; /// Set the value to the specified normal. - virtual void SetNormal( const CqVector3D& val, TqInt index ) = 0; + virtual void SetNormal( const Imath::V3f& val, TqInt index ) = 0; /// Set the value to the specified color. virtual void SetColor( const CqColor& val, TqInt index ) = 0; /// Set the value to the specified matrix. @@ -142,7 +142,7 @@ struct IqShaderData { GetString( s, index ); } - void GetValue( CqVector3D& p, TqInt index = 0 ) const + void GetValue( Imath::V3f& p, TqInt index = 0 ) const { GetPoint( p, index ); } @@ -167,7 +167,7 @@ struct IqShaderData { GetStringPtr( s ); } - void GetValuePtr( const CqVector3D*& p ) const + void GetValuePtr( const Imath::V3f*& p ) const { GetPointPtr( p ); } @@ -192,7 +192,7 @@ struct IqShaderData { GetStringPtr( s ); } - void GetValuePtr( CqVector3D*& p ) + void GetValuePtr( Imath::V3f*& p ) { GetPointPtr( p ); } @@ -221,7 +221,7 @@ struct IqShaderData { SetString( s ); } - void SetValue( const CqVector3D& p ) + void SetValue( const Imath::V3f& p ) { SetPoint( p ); } @@ -250,7 +250,7 @@ struct IqShaderData { SetString( s, index ); } - void SetValue( const CqVector3D& p, TqInt index ) + void SetValue( const Imath::V3f& p, TqInt index ) { SetPoint( p, index ); } diff --git a/include/aqsis/tex/filtering/iocclusionsampler.h b/include/aqsis/tex/filtering/iocclusionsampler.h index 9d750aa..935ac0b 100644 --- a/include/aqsis/tex/filtering/iocclusionsampler.h +++ b/include/aqsis/tex/filtering/iocclusionsampler.h @@ -52,7 +52,7 @@ class AQSIS_TEX_SHARE IqOcclusionSampler * \param outSamps - the outSamps samples will be placed here. */ virtual void sample(const Sq3DSamplePllgram& samplePllgram, - const CqVector3D& normal, const CqShadowSampleOptions& sampleOpts, + const Imath::V3f& normal, const CqShadowSampleOptions& sampleOpts, TqFloat* outSamps) const = 0; /** \brief Get the default sample options for this texture. diff --git a/include/aqsis/tex/filtering/samplequad.h b/include/aqsis/tex/filtering/samplequad.h index edb02ac..0e362f2 100644 --- a/include/aqsis/tex/filtering/samplequad.h +++ b/include/aqsis/tex/filtering/samplequad.h @@ -115,16 +115,16 @@ struct SqSampleQuad struct Sq3DSampleQuad { /// v1 to v4 are vectors defining the vertices of the quadrilateral. - CqVector3D v1; - CqVector3D v2; - CqVector3D v3; - CqVector3D v4; + Imath::V3f v1; + Imath::V3f v2; + Imath::V3f v3; + Imath::V3f v4; /// Default constructor - set all corner vectors to 0. Sq3DSampleQuad(); /// Trivial constructor - Sq3DSampleQuad(const CqVector3D& v1, const CqVector3D& v2, - const CqVector3D& v3, const CqVector3D& v4); + Sq3DSampleQuad(const Imath::V3f& v1, const Imath::V3f& v2, + const Imath::V3f& v3, const Imath::V3f& v4); /** \brief Multiply all the vectors in the quad by the specified matrix. * @@ -137,7 +137,7 @@ struct Sq3DSampleQuad void transform(const CqMatrix& mat); /// Get the center point of the quadrilateral by averaging the vertices. - CqVector3D center() const; + Imath::V3f center() const; /** \brief Assign the first two coordinates of a 2D sample quad to this quad. * @@ -208,14 +208,14 @@ struct SqSamplePllgram struct Sq3DSamplePllgram { /// center point for the sample - CqVector3D c; + Imath::V3f c; /// first side of parallelogram - CqVector3D s1; + Imath::V3f s1; /// second side of parallelogram - CqVector3D s2; + Imath::V3f s2; /// Trivial constructor - Sq3DSamplePllgram(const CqVector3D& c, const CqVector3D& s1, const CqVector3D s2); + Sq3DSamplePllgram(const Imath::V3f& c, const Imath::V3f& s1, const Imath::V3f s2); /// Convert from a sample quad to a sample parallelogram explicit Sq3DSamplePllgram(const Sq3DSampleQuad& quad); }; @@ -273,29 +273,29 @@ inline Sq3DSampleQuad::Sq3DSampleQuad() v4(0,0,0) { } -inline Sq3DSampleQuad::Sq3DSampleQuad(const CqVector3D& v1, const CqVector3D& v2, - const CqVector3D& v3, const CqVector3D& v4) +inline Sq3DSampleQuad::Sq3DSampleQuad(const Imath::V3f& v1, const Imath::V3f& v2, + const Imath::V3f& v3, const Imath::V3f& v4) : v1(v1), v2(v2), v3(v3), v4(v4) { } -inline CqVector3D Sq3DSampleQuad::center() const +inline Imath::V3f Sq3DSampleQuad::center() const { - return 0.25*(v1+v2+v3+v4); + return (v1+v2+v3+v4)*0.25; } inline void Sq3DSampleQuad::copy2DCoords(const SqSampleQuad& toCopy) { - v1.x(toCopy.v1.x); - v1.y(toCopy.v1.y); - v2.x(toCopy.v2.x); - v2.y(toCopy.v2.y); - v3.x(toCopy.v3.x); - v3.y(toCopy.v3.y); - v4.x(toCopy.v4.x); - v4.y(toCopy.v4.y); + v1.x = toCopy.v1.x; + v1.y = toCopy.v1.y; + v2.x = toCopy.v2.x; + v2.y = toCopy.v2.y; + v3.x = toCopy.v3.x; + v3.y = toCopy.v3.y; + v4.x = toCopy.v4.x; + v4.y = toCopy.v4.y; } inline void SqSampleQuad::scaleWidth(TqFloat xWidth, TqFloat yWidth) @@ -369,8 +369,8 @@ inline void SqSamplePllgram::scaleWidth(TqFloat xWidth, TqFloat yWidth) //------------------------------------------------------------------------------ // Sq3DSamplePllgram implementation -inline Sq3DSamplePllgram::Sq3DSamplePllgram(const CqVector3D& c, - const CqVector3D& s1, const CqVector3D s2) +inline Sq3DSamplePllgram::Sq3DSamplePllgram(const Imath::V3f& c, + const Imath::V3f& s1, const Imath::V3f s2) : c(c), s1(s1), s2(s2) @@ -378,8 +378,8 @@ inline Sq3DSamplePllgram::Sq3DSamplePllgram(const CqVector3D& c, inline Sq3DSamplePllgram::Sq3DSamplePllgram(const Sq3DSampleQuad& quad) : c(quad.center()), - s1(0.5*(quad.v2 - quad.v1 + quad.v4 - quad.v3)), - s2(0.5*(quad.v1 - quad.v3 + quad.v2 - quad.v4)) + s1((quad.v2 - quad.v1 + quad.v4 - quad.v3)*0.5), + s2((quad.v1 - quad.v3 + quad.v2 - quad.v4)*0.5) { } diff --git a/libs/core/api/genpoly.cpp b/libs/core/api/genpoly.cpp index 035d082..9436fbb 100644 --- a/libs/core/api/genpoly.cpp +++ b/libs/core/api/genpoly.cpp @@ -65,26 +65,26 @@ CqPolygonGeneral2D& CqPolygonGeneral2D::operator=( const CqPolygonGeneral2D& Fro //--------------------------------------------------------------------- void CqPolygonGeneral2D::CalcAxis() { - CqParameterTyped<CqVector4D, CqVector3D>* P = m_pVertices->P(); + CqParameterTyped<CqVector4D, Imath::V3f>* P = m_pVertices->P(); // Obtain a nondegenerate normal vector for the polygon. - CqVector3D normal(1,0,0); + Imath::V3f normal(1,0,0); TqInt i = 0; TqFloat maxNormalComp = 0; while(i+2 < cVertices() && maxNormalComp < 1e-6) { - CqVector3D diff1 = vectorCast<CqVector3D>(P->pValue(m_aiVertices[i+1])[0] - P->pValue(m_aiVertices[i])[0]); - CqVector3D diff2 = vectorCast<CqVector3D>(P->pValue(m_aiVertices[i+2])[0] - P->pValue(m_aiVertices[i+1])[0]); + Imath::V3f diff1 = vectorCast<Imath::V3f>(P->pValue(m_aiVertices[i+1])[0] - P->pValue(m_aiVertices[i])[0]); + Imath::V3f diff2 = vectorCast<Imath::V3f>(P->pValue(m_aiVertices[i+2])[0] - P->pValue(m_aiVertices[i+1])[0]); normal = diff1 % diff2; // get absolute value of normal componenets. normal = Aqsis::max(normal, -normal); // maximum component of the normal. - maxNormalComp = Aqsis::max(Aqsis::max(normal.x(), normal.y()), normal.z()); + maxNormalComp = Aqsis::max(Aqsis::max(normal.x, normal.y), normal.z); ++i; } // We want to project out the axis which has the maximum normal component. - if(normal.x() > normal.y() && normal.x() > normal.z()) + if(normal.x > normal.y && normal.x > normal.z) SetAxis(Axis_YZ); - else if(normal.y() > normal.x() && normal.y() > normal.z()) + else if(normal.y > normal.x && normal.y > normal.z) SetAxis(Axis_XZ); else SetAxis(Axis_XY); diff --git a/libs/core/api/ri.cpp b/libs/core/api/ri.cpp index fa29d53..997abdc 100644 --- a/libs/core/api/ri.cpp +++ b/libs/core/api/ri.cpp @@ -1822,30 +1822,30 @@ RtVoid RiOptionV( RtToken name, PARAMETERLIST ) case type_point: { RtFloat* pc = reinterpret_cast<RtFloat*>( value ); - CqVector3D* pOpt = QGetRenderContext()->poptWriteCurrent()->GetPointOptionWrite(name, undecoratedName, Count); + Imath::V3f* pOpt = QGetRenderContext()->poptWriteCurrent()->GetPointOptionWrite(name, undecoratedName, Count); RtInt j; for ( j = 0; j < Count; ++j ) - pOpt[ j ] = CqVector3D(pc[ (j*3) ], pc[ (j*3)+1 ], pc[ (j*3)+2 ]); + pOpt[ j ] = Imath::V3f(pc[ (j*3) ], pc[ (j*3)+1 ], pc[ (j*3)+2 ]); } break; case type_normal: { RtFloat* pc = reinterpret_cast<RtFloat*>( value ); - CqVector3D* pOpt = QGetRenderContext()->poptWriteCurrent()->GetPointOptionWrite(name, undecoratedName, Count); + Imath::V3f* pOpt = QGetRenderContext()->poptWriteCurrent()->GetPointOptionWrite(name, undecoratedName, Count); RtInt j; for ( j = 0; j < Count; ++j ) - pOpt[ j ] = CqVector3D(pc[ (j*3) ], pc[ (j*3)+1 ], pc[ (j*3)+2 ]); + pOpt[ j ] = Imath::V3f(pc[ (j*3) ], pc[ (j*3)+1 ], pc[ (j*3)+2 ]); } break; case type_vector: { RtFloat* pc = reinterpret_cast<RtFloat*>( value ); - CqVector3D* pOpt = QGetRenderContext()->poptWriteCurrent()->GetPointOptionWrite(name, undecoratedName, Count); + Imath::V3f* pOpt = QGetRenderContext()->poptWriteCurrent()->GetPointOptionWrite(name, undecoratedName, Count); RtInt j; for ( j = 0; j < Count; ++j ) - pOpt[ j ] = CqVector3D(pc[ (j*3) ], pc[ (j*3)+1 ], pc[ (j*3)+2 ]); + pOpt[ j ] = Imath::V3f(pc[ (j*3) ], pc[ (j*3)+1 ], pc[ (j*3)+2 ]); } break; @@ -2738,7 +2738,7 @@ RtVoid RiTranslate( RtFloat dx, RtFloat dy, RtFloat dz ) DEBUG_RITRANSLATE - CqMatrix matTrans( CqVector3D( dx, dy, dz ) ); + CqMatrix matTrans( Imath::V3f( dx, dy, dz ) ); // Check if this transformation results in a change in orientation. // if ( matTrans.Determinant() < 0 && ( QGetRenderContext()->pconCurrent()->Type() != Motion || QGetRenderContext()->pconCurrent()->TimeIndex() == 0 ) ) // QGetRenderContext() ->pattrWriteCurrent() ->FlipeCoordsysOrientation( QGetRenderContext() ->Time() ); @@ -2766,7 +2766,7 @@ RtVoid RiRotate( RtFloat angle, RtFloat dx, RtFloat dy, RtFloat dz ) DEBUG_RIROTATE - CqMatrix matRot( degToRad( angle ), CqVector3D( dx, dy, dz ) ); + CqMatrix matRot( degToRad( angle ), Imath::V3f( dx, dy, dz ) ); // Check if this transformation results in a change in orientation. // if ( matRot.Determinant() < 0 && ( QGetRenderContext()->pconCurrent()->Type() != Motion || QGetRenderContext()->pconCurrent()->TimeIndex() == 0 ) ) // QGetRenderContext() ->pattrWriteCurrent() ->FlipeCoordsysOrientation( QGetRenderContext() ->Time() ); @@ -3003,11 +3003,11 @@ RtPoint* RiTransformPoints( RtToken fromspace, RtToken tospace, RtInt npoints, R { for(TqInt i =0; i< npoints; i++) { - CqVector3D tmp(points[i]); + Imath::V3f tmp(points[i][0], points[i][1], points[i][2]); tmp = matCToW * tmp; - points[i][0] = tmp.x(); - points[i][1] = tmp.y(); - points[i][2] = tmp.z(); + points[i][0] = tmp.x; + points[i][1] = tmp.y; + points[i][2] = tmp.z; } } @@ -3323,10 +3323,10 @@ RtVoid RiGeneralPolygonV( RtInt nloops, RtInt nverts[], PARAMETERLIST ) TqFloat MinX, MaxX; TqFloat MinY, MaxY; TqFloat MinZ, MaxZ; - CqVector3D vecTemp = vectorCast<CqVector3D>(pPointsClass->P()->pValue(0)[0]); - MinX = MaxX = vecTemp.x(); - MinY = MaxY = vecTemp.y(); - MinZ = MaxZ = vecTemp.z(); + Imath::V3f vecTemp = vectorCast<Imath::V3f>(pPointsClass->P()->pValue(0)[0]); + MinX = MaxX = vecTemp.x; + MinY = MaxY = vecTemp.y; + MinZ = MaxZ = vecTemp.z; // We need to take into account Orientation here. bool O = QGetRenderContext()->pattrCurrent() ->GetIntegerAttribute( "System", "Orientation" ) [ 0 ] != 0; @@ -3334,13 +3334,13 @@ RtVoid RiGeneralPolygonV( RtInt nloops, RtInt nverts[], PARAMETERLIST ) TqUint iVert; for ( iVert = 1; iVert < pPointsClass->P() ->Size(); ++iVert ) { - vecTemp = vectorCast<CqVector3D>(pPointsClass->P()->pValue(iVert)[0]); - MinX = ( MinX < vecTemp.x() ) ? MinX : vecTemp.x(); - MinY = ( MinY < vecTemp.y() ) ? MinY : vecTemp.y(); - MinZ = ( MinZ < vecTemp.z() ) ? MinZ : vecTemp.z(); - MaxX = ( MaxX > vecTemp.x() ) ? MaxX : vecTemp.x(); - MaxY = ( MaxY > vecTemp.y() ) ? MaxY : vecTemp.y(); - MaxZ = ( MaxZ > vecTemp.z() ) ? MaxZ : vecTemp.z(); + vecTemp = vectorCast<Imath::V3f>(pPointsClass->P()->pValue(iVert)[0]); + MinX = ( MinX < vecTemp.x ) ? MinX : vecTemp.x; + MinY = ( MinY < vecTemp.y ) ? MinY : vecTemp.y; + MinZ = ( MinZ < vecTemp.z ) ? MinZ : vecTemp.z; + MaxX = ( MaxX > vecTemp.x ) ? MaxX : vecTemp.x; + MaxY = ( MaxY > vecTemp.y ) ? MaxY : vecTemp.y; + MaxZ = ( MaxZ > vecTemp.z ) ? MaxZ : vecTemp.z; } TqFloat DiffX = MaxX - MinX; TqFloat DiffY = MaxY - MinY; @@ -3467,13 +3467,13 @@ RtVoid RiBlobbyV( RtInt nleaf, RtInt ncode, RtInt code[], RtInt nflt, RtFloat fl // The bounding-box stops at camera's plane TqFloat camera_z = QGetRenderContext() ->poptCurrent() ->GetFloatOption( "System", "Clipping" ) [ 0 ]; - if(Bound.vecMax().z() < camera_z) + if(Bound.vecMax().z < camera_z) // Blobby's behind the camera return; - if(Bound.vecMin().z() < camera_z) + if(Bound.vecMin().z < camera_z) // Cut the bounding-box with camera's plane - Bound = CqBound(CqVector3D(Bound.vecMin().x(), Bound.vecMin().y(), camera_z), Bound.vecMax()); + Bound = CqBound(Imath::V3f(Bound.vecMin().x, Bound.vecMin().y, camera_z), Bound.vecMax()); // Transform the bounding box into raster coordinates CqMatrix matCamToRaster; @@ -3481,8 +3481,8 @@ RtVoid RiBlobbyV( RtInt nleaf, RtInt ncode, RtInt code[], RtInt nflt, RtFloat fl Bound.Transform( matCamToRaster ); // Get bounding-box size in pixels - TqInt pixels_w = static_cast<TqInt> ( Bound.vecCross().x() ); - TqInt pixels_h = static_cast<TqInt> ( Bound.vecCross().y() ); + TqInt pixels_w = static_cast<TqInt> ( Bound.vecCross().x ); + TqInt pixels_h = static_cast<TqInt> ( Bound.vecCross().y ); // Adjust to shading rate // TODO: Blobbies should be CqSurfaces - in that case they could make of @@ -3514,7 +3514,7 @@ RtVoid RiBlobbyV( RtInt nleaf, RtInt ncode, RtInt code[], RtInt nflt, RtFloat fl if (strstr(tokens[c], RI_CS)) { - CqVector3D cg; + Imath::V3f cg; for( int i = 0; i < npoints; i++ ) { @@ -4477,12 +4477,12 @@ RtVoid RiTrimCurve( RtInt nloops, RtInt ncurves[], RtInt order[], RtFloat knot[] Curve.aKnots() [ i ] = knot[ iknot++ ]; // Copy the vertices from the u,v,w arrays. - CqVector3D vec( 0, 0, 1 ); + Imath::V3f vec( 0, 0, 1 ); for ( i = 0; i < cverts; ++i ) { - vec.x( u[ ivert ] ); - vec.y( v[ ivert ] ); - vec.z( w[ ivert++ ] ); + vec.x = u[ ivert ]; + vec.y = v[ ivert ]; + vec.z = w[ ivert++ ]; Curve.CP( i ) = vec; } Loop.aCurves().push_back( Curve ); @@ -4675,8 +4675,8 @@ RtVoid RiHyperboloidV( RtPoint point1, RtPoint point2, RtFloat thetamax, PARAMET DEBUG_RIHYPERBOLOID // Create a hyperboloid - CqVector3D v0( point1[ 0 ], point1[ 1 ], point1[ 2 ] ); - CqVector3D v1( point2[ 0 ], point2[ 1 ], point2[ 2 ] ); + Imath::V3f v0( point1[ 0 ], point1[ 1 ], point1[ 2 ] ); + Imath::V3f v1( point2[ 0 ], point2[ 1 ], point2[ 2 ] ); boost::shared_ptr<CqHyperboloid> pSurface( new CqHyperboloid( v0, v1, 0, thetamax ) ); ProcessPrimitiveVariables( pSurface.get(), count, tokens, values ); pSurface->SetDefaultPrimitiveVariables(); @@ -6017,8 +6017,8 @@ static RtBoolean ProcessPrimitiveVariables( CqSurface * pSurface, PARAMETERLIST // Fill in the position variable according to type. if ( fP != RIL_NONE ) { - CqParameterTypedVertex<CqVector4D, type_hpoint, CqVector3D>* P - = new CqParameterTypedVertex<CqVector4D, type_hpoint, CqVector3D>("P", 1); + CqParameterTypedVertex<CqVector4D, type_hpoint, Imath::V3f>* P + = new CqParameterTypedVertex<CqVector4D, type_hpoint, Imath::V3f>("P", 1); TqInt cVertex = pSurface->cVertex(); P->SetSize(cVertex); switch ( fP ) @@ -6031,8 +6031,8 @@ static RtBoolean ProcessPrimitiveVariables( CqSurface * pSurface, PARAMETERLIST case RIL_Pz: for (TqInt i = 0; i < cVertex; ++i ) { - CqVector3D vecP = pSurface->SurfaceParametersAtVertex( i ); - vecP.z( pPoints[ i ] ); + Imath::V3f vecP = pSurface->SurfaceParametersAtVertex( i ); + vecP.z = pPoints[ i ]; P->pValue( i )[0] = vectorCast<CqVector4D>(vecP); } break; @@ -6114,13 +6114,13 @@ static RtBoolean ProcessPrimitiveVariables( CqSurface * pSurface, PARAMETERLIST case type_normal: case type_vector: { - CqParameterTyped<CqVector3D, CqVector3D>* pVectorParam = static_cast<CqParameterTyped<CqVector3D, CqVector3D>*>( pNewParam ); + CqParameterTyped<Imath::V3f, Imath::V3f>* pVectorParam = static_cast<CqParameterTyped<Imath::V3f, Imath::V3f>*>( pNewParam ); TqFloat* pValue = reinterpret_cast<TqFloat*>( values[ *iUserParam ] ); TqInt iArrayIndex, iValIndex; i = 0; for ( iValIndex = 0; iValIndex < cValues; ++iValIndex ) for ( iArrayIndex = 0; iArrayIndex < tok.count(); ++iArrayIndex, ++i ) - pVectorParam->pValue( iValIndex ) [ iArrayIndex ] = CqVector3D( pValue[ ( i * 3 ) ], pValue[ ( i * 3 ) + 1 ], pValue[ ( i * 3 ) + 2 ] ); + pVectorParam->pValue( iValIndex ) [ iArrayIndex ] = Imath::V3f( pValue[ ( i * 3 ) ], pValue[ ( i * 3 ) + 1 ], pValue[ ( i * 3 ) + 2 ] ); } break; @@ -6150,7 +6150,7 @@ static RtBoolean ProcessPrimitiveVariables( CqSurface * pSurface, PARAMETERLIST case type_hpoint: { - CqParameterTyped<CqVector4D, CqVector3D>* pVectorParam = static_cast<CqParameterTyped<CqVector4D, CqVector3D>*>( pNewParam ); + CqParameterTyped<CqVector4D, Imath::V3f>* pVectorParam = static_cast<CqParameterTyped<CqVector4D, Imath::V3f>*>( pNewParam ); TqFloat* pValue = reinterpret_cast<TqFloat*>( values[ *iUserParam ] ); TqInt iArrayIndex, iValIndex; i = 0; diff --git a/libs/core/attributes.cpp b/libs/core/attributes.cpp index f13d85d..cc4674f 100644 --- a/libs/core/attributes.cpp +++ b/libs/core/attributes.cpp @@ -286,11 +286,11 @@ CqString* CqAttributes::GetStringAttributeWrite( const char* strName, const char * \return CqVetor3D pointer 0 if not found. */ -CqVector3D* CqAttributes::GetPointAttributeWrite( const char* strName, const char* strParam ) +Imath::V3f* CqAttributes::GetPointAttributeWrite( const char* strName, const char* strParam ) { CqParameter * pParam = pParameterWrite( strName, strParam ); if ( pParam != 0 && pParam->Type() == type_point ) - return ( static_cast<CqParameterTyped<CqVector3D, CqVector3D>*>( pParam ) ->pValue() ); + return ( static_cast<CqParameterTyped<Imath::V3f, Imath::V3f>*>( pParam ) ->pValue() ); else return ( 0 ); } @@ -303,11 +303,11 @@ CqVector3D* CqAttributes::GetPointAttributeWrite( const char* strName, const cha * \return CqVetor3D pointer 0 if not found. */ -CqVector3D* CqAttributes::GetVectorAttributeWrite( const char* strName, const char* strParam ) +Imath::V3f* CqAttributes::GetVectorAttributeWrite( const char* strName, const char* strParam ) { CqParameter * pParam = pParameterWrite( strName, strParam ); if ( pParam != 0 && pParam->Type() == type_vector ) - return ( static_cast<CqParameterTyped<CqVector3D, CqVector3D>*>( pParam ) ->pValue() ); + return ( static_cast<CqParameterTyped<Imath::V3f, Imath::V3f>*>( pParam ) ->pValue() ); else return ( 0 ); } @@ -320,11 +320,11 @@ CqVector3D* CqAttributes::GetVectorAttributeWrite( const char* strName, const ch * \return CqVetor3D pointer 0 if not found. */ -CqVector3D* CqAttributes::GetNormalAttributeWrite( const char* strName, const char* strParam ) +Imath::V3f* CqAttributes::GetNormalAttributeWrite( const char* strName, const char* strParam ) { CqParameter * pParam = pParameterWrite( strName, strParam ); if ( pParam != 0 && pParam->Type() == type_normal ) - return ( static_cast<CqParameterTyped<CqVector3D, CqVector3D>*>( pParam ) ->pValue() ); + return ( static_cast<CqParameterTyped<Imath::V3f, Imath::V3f>*>( pParam ) ->pValue() ); else return ( 0 ); } @@ -419,14 +419,14 @@ const CqString* CqAttributes::GetStringAttribute( const char* strName, const cha /** Get a point system attribute parameter. * \param strName The name of the attribute. * \param strParam The name of the paramter on the attribute. - * \return CqVector3D pointer 0 if not found. + * \return Imath::V3f pointer 0 if not found. */ -const CqVector3D* CqAttributes::GetPointAttribute( const char* strName, const char* strParam ) const +const Imath::V3f* CqAttributes::GetPointAttribute( const char* strName, const char* strParam ) const { const CqParameter * pParam = pParameter( strName, strParam ); if ( pParam != 0 && pParam->Type() == type_point ) - return ( static_cast<const CqParameterTyped<CqVector3D, CqVector3D>*>( pParam ) ->pValue() ); + return ( static_cast<const CqParameterTyped<Imath::V3f, Imath::V3f>*>( pParam ) ->pValue() ); else return ( 0 ); } @@ -436,14 +436,14 @@ const CqVector3D* CqAttributes::GetPointAttribute( const char* strName, const ch /** Get a vector system attribute parameter. * \param strName The name of the attribute. * \param strParam The name of the paramter on the attribute. - * \return CqVector3D pointer 0 if not found. + * \return Imath::V3f pointer 0 if not found. */ -const CqVector3D* CqAttributes::GetVectorAttribute( const char* strName, const char* strParam ) const +const Imath::V3f* CqAttributes::GetVectorAttribute( const char* strName, const char* strParam ) const { const CqParameter * pParam = pParameter( strName, strParam ); if ( pParam != 0 && pParam->Type() == type_vector ) - return ( static_cast<const CqParameterTyped<CqVector3D, CqVector3D>*>( pParam ) ->pValue() ); + return ( static_cast<const CqParameterTyped<Imath::V3f, Imath::V3f>*>( pParam ) ->pValue() ); else return ( 0 ); } @@ -453,14 +453,14 @@ const CqVector3D* CqAttributes::GetVectorAttribute( const char* strName, const c /** Get a normal system attribute parameter. * \param strName The name of the attribute. * \param strParam The name of the paramter on the attribute. - * \return CqVector3D pointer 0 if not found. + * \return Imath::V3f pointer 0 if not found. */ -const CqVector3D* CqAttributes::GetNormalAttribute( const char* strName, const char* strParam ) const +const Imath::V3f* CqAttributes::GetNormalAttribute( const char* strName, const char* strParam ) const { const CqParameter * pParam = pParameter( strName, strParam ); if ( pParam != 0 && pParam->Type() == type_normal ) - return ( static_cast<const CqParameterTyped<CqVector3D, CqVector3D>*>( pParam ) ->pValue() ); + return ( static_cast<const CqParameterTyped<Imath::V3f, Imath::V3f>*>( pParam ) ->pValue() ); else return ( 0 ); } diff --git a/libs/core/attributes.h b/libs/core/attributes.h index 4ebb0cf..b77dd56 100644 --- a/libs/core/attributes.h +++ b/libs/core/attributes.h @@ -250,18 +250,18 @@ class CqAttributes : public IqAttributes, public boost::enable_shared_from_this< virtual const TqFloat* GetFloatAttribute( const char* strName, const char* strParam ) const; virtual const TqInt* GetIntegerAttribute( const char* strName, const char* strParam ) const; virtual const CqString* GetStringAttribute( const char* strName, const char* strParam ) const; - virtual const CqVector3D* GetPointAttribute( const char* strName, const char* strParam ) const; - virtual const CqVector3D* GetVectorAttribute( const char* strName, const char* strParam ) const; - virtual const CqVector3D* GetNormalAttribute( const char* strName, const char* strParam ) const; + virtual const Imath::V3f* GetPointAttribute( const char* strName, const char* strParam ) const; + virtual const Imath::V3f* GetVectorAttribute( const char* strName, const char* strParam ) const; + virtual const Imath::V3f* GetNormalAttribute( const char* strName, const char* strParam ) const; virtual const CqColor* GetColorAttribute( const char* strName, const char* strParam ) const; virtual const CqMatrix* GetMatrixAttribute( const char* strName, const char* strParam ) const; virtual TqFloat* GetFloatAttributeWrite( const char* strName, const char* strParam ); virtual TqInt* GetIntegerAttributeWrite( const char* strName, const char* strParam ); virtual CqString* GetStringAttributeWrite( const char* strName, const char* strParam ); - virtual CqVector3D* GetPointAttributeWrite( const char* strName, const char* strParam ); - virtual CqVector3D* GetVectorAttributeWrite( const char* strName, const char* strParam ); - virtual CqVector3D* GetNormalAttributeWrite( const char* strName, const char* strParam ); + virtual Imath::V3f* GetPointAttributeWrite( const char* strName, const char* strParam ); + virtual Imath::V3f* GetVectorAttributeWrite( const char* strName, const char* strParam ); + virtual Imath::V3f* GetNormalAttributeWrite( const char* strName, const char* strParam ); virtual CqColor* GetColorAttributeWrite( const char* strName, const char* strParam ); virtual CqMatrix* GetMatrixAttributeWrite( const char* strName, const char* strParam ); diff --git a/libs/core/bound.cpp b/libs/core/bound.cpp index e5036ee..26ba193 100644 --- a/libs/core/bound.cpp +++ b/libs/core/bound.cpp @@ -56,15 +56,15 @@ CqBound& CqBound::operator=( const CqBound& From ) /** * Fills \param cuboid with the 8 points of a bounding box */ -void CqBound::getBoundCuboid(CqVector3D cuboid[8]) +void CqBound::getBoundCuboid(Imath::V3f cuboid[8]) { cuboid[ 0 ] = m_vecMin; - cuboid[ 1 ] = CqVector3D( m_vecMax.x(), m_vecMin.y(), m_vecMin.z() ); - cuboid[ 2 ] = CqVector3D( m_vecMin.x(), m_vecMax.y(), m_vecMin.z() ); - cuboid[ 3 ] = CqVector3D( m_vecMin.x(), m_vecMin.y(), m_vecMax.z() ); - cuboid[ 4 ] = CqVector3D( m_vecMax.x(), m_vecMax.y(), m_vecMin.z() ); - cuboid[ 5 ] = CqVector3D( m_vecMin.x(), m_vecMax.y(), m_vecMax.z() ); - cuboid[ 6 ] = CqVector3D( m_vecMax.x(), m_vecMin.y(), m_vecMax.z() ); + cuboid[ 1 ] = Imath::V3f( m_vecMax.x, m_vecMin.y, m_vecMin.z ); + cuboid[ 2 ] = Imath::V3f( m_vecMin.x, m_vecMax.y, m_vecMin.z ); + cuboid[ 3 ] = Imath::V3f( m_vecMin.x, m_vecMin.y, m_vecMax.z ); + cuboid[ 4 ] = Imath::V3f( m_vecMax.x, m_vecMax.y, m_vecMin.z ); + cuboid[ 5 ] = Imath::V3f( m_vecMin.x, m_vecMax.y, m_vecMax.z ); + cuboid[ 6 ] = Imath::V3f( m_vecMax.x, m_vecMin.y, m_vecMax.z ); cuboid[ 7 ] = m_vecMax; } @@ -77,36 +77,36 @@ void CqBound::getBoundCuboid(CqVector3D cuboid[8]) void CqBound::Transform( const CqMatrix& matTransform ) { // Transform the cuboid points. - CqVector3D avecCuboid[ 8 ]; + Imath::V3f avecCuboid[ 8 ]; avecCuboid[ 0 ] = m_vecMin; - avecCuboid[ 1 ] = CqVector3D( m_vecMax.x(), m_vecMin.y(), m_vecMin.z() ); - avecCuboid[ 2 ] = CqVector3D( m_vecMin.x(), m_vecMax.y(), m_vecMin.z() ); - avecCuboid[ 3 ] = CqVector3D( m_vecMin.x(), m_vecMin.y(), m_vecMax.z() ); - avecCuboid[ 4 ] = CqVector3D( m_vecMax.x(), m_vecMax.y(), m_vecMin.z() ); - avecCuboid[ 5 ] = CqVector3D( m_vecMin.x(), m_vecMax.y(), m_vecMax.z() ); - avecCuboid[ 6 ] = CqVector3D( m_vecMax.x(), m_vecMin.y(), m_vecMax.z() ); + avecCuboid[ 1 ] = Imath::V3f( m_vecMax.x, m_vecMin.y, m_vecMin.z ); + avecCuboid[ 2 ] = Imath::V3f( m_vecMin.x, m_vecMax.y, m_vecMin.z ); + avecCuboid[ 3 ] = Imath::V3f( m_vecMin.x, m_vecMin.y, m_vecMax.z ); + avecCuboid[ 4 ] = Imath::V3f( m_vecMax.x, m_vecMax.y, m_vecMin.z ); + avecCuboid[ 5 ] = Imath::V3f( m_vecMin.x, m_vecMax.y, m_vecMax.z ); + avecCuboid[ 6 ] = Imath::V3f( m_vecMax.x, m_vecMin.y, m_vecMax.z ); avecCuboid[ 7 ] = m_vecMax; - m_vecMin = CqVector3D( FLT_MAX, FLT_MAX, FLT_MAX ); - m_vecMax = CqVector3D( -FLT_MAX, -FLT_MAX, -FLT_MAX ); + m_vecMin = Imath::V3f( FLT_MAX, FLT_MAX, FLT_MAX ); + m_vecMax = Imath::V3f( -FLT_MAX, -FLT_MAX, -FLT_MAX ); TqInt i; for ( i = 0; i < 8; i++ ) { avecCuboid[ i ] = matTransform * avecCuboid[ i ]; - if ( avecCuboid[ i ].x() < m_vecMin.x() ) - m_vecMin.x( avecCuboid[ i ].x() ); - if ( avecCuboid[ i ].y() < m_vecMin.y() ) - m_vecMin.y( avecCuboid[ i ].y() ); - if ( avecCuboid[ i ].z() < m_vecMin.z() ) - m_vecMin.z( avecCuboid[ i ].z() ); - - if ( avecCuboid[ i ].x() > m_vecMax.x() ) - m_vecMax.x( avecCuboid[ i ].x() ); - if ( avecCuboid[ i ].y() > m_vecMax.y() ) - m_vecMax.y( avecCuboid[ i ].y() ); - if ( avecCuboid[ i ].z() > m_vecMax.z() ) - m_vecMax.z( avecCuboid[ i ].z() ); + if ( avecCuboid[ i ].x < m_vecMin.x ) + m_vecMin.x = avecCuboid[ i ].x; + if ( avecCuboid[ i ].y < m_vecMin.y ) + m_vecMin.y = avecCuboid[ i ].y; + if ( avecCuboid[ i ].z < m_vecMin.z ) + m_vecMin.z = avecCuboid[ i ].z; + + if ( avecCuboid[ i ].x > m_vecMax.x ) + m_vecMax.x = avecCuboid[ i ].x; + if ( avecCuboid[ i ].y > m_vecMax.y ) + m_vecMax.y = avecCuboid[ i ].y; + if ( avecCuboid[ i ].z > m_vecMax.z ) + m_vecMax.z = avecCuboid[ i ].z; } } @@ -118,30 +118,30 @@ void CqBound::Transform( const CqMatrix& matTransform ) void CqBound::Encapsulate( const CqBound* const bound ) { - m_vecMax.x( max( m_vecMax.x(), bound->vecMax().x() ) ); - m_vecMax.y( max( m_vecMax.y(), bound->vecMax().y() ) ); - m_vecMax.z( max( m_vecMax.z(), bound->vecMax().z() ) ); + m_vecMax.x = max( m_vecMax.x, bound->vecMax().x ); + m_vecMax.y = max( m_vecMax.y, bound->vecMax().y ); + m_vecMax.z = max( m_vecMax.z, bound->vecMax().z ); - m_vecMin.x( min( m_vecMin.x(), bound->vecMin().x() ) ); - m_vecMin.y( min( m_vecMin.y(), bound->vecMin().y() ) ); - m_vecMin.z( min( m_vecMin.z(), bound->vecMin().z() ) ); + m_vecMin.x = min( m_vecMin.x, bound->vecMin().x ); + m_vecMin.y = min( m_vecMin.y, bound->vecMin().y ); + m_vecMin.z = min( m_vecMin.z, bound->vecMin().z ); } //--------------------------------------------------------------------- /** Expand this bound to encapsulate the specified point. - * \param v CqVector3D to expand bound to include. + * \param v Imath::V3f to expand bound to include. */ -void CqBound::Encapsulate( const CqVector3D& v ) +void CqBound::Encapsulate( const Imath::V3f& v ) { - m_vecMax.x( max( m_vecMax.x(), v.x() ) ); - m_vecMax.y( max( m_vecMax.y(), v.y() ) ); - m_vecMax.z( max( m_vecMax.z(), v.z() ) ); + m_vecMax.x = max( m_vecMax.x, v.x ); + m_vecMax.y = max( m_vecMax.y, v.y ); + m_vecMax.z = max( m_vecMax.z, v.z ); - m_vecMin.x( min( m_vecMin.x(), v.x() ) ); - m_vecMin.y( min( m_vecMin.y(), v.y() ) ); - m_vecMin.z( min( m_vecMin.z(), v.z() ) ); + m_vecMin.x = min( m_vecMin.x, v.x ); + m_vecMin.y = min( m_vecMin.y, v.y ); + m_vecMin.z = min( m_vecMin.z, v.z ); } @@ -152,11 +152,11 @@ void CqBound::Encapsulate( const CqVector3D& v ) void CqBound::Encapsulate( const Imath::V2f& v ) { - m_vecMax.x( max( m_vecMax.x(), v.x ) ); - m_vecMax.y( max( m_vecMax.y(), v.y ) ); + m_vecMax.x = max( m_vecMax.x, v.x ); + m_vecMax.y = max( m_vecMax.y, v.y ); - m_vecMin.x( min( m_vecMin.x(), v.x ) ); - m_vecMin.y( min( m_vecMin.y(), v.y ) ); + m_vecMin.x = min( m_vecMin.x, v.x ); + m_vecMin.y = min( m_vecMin.y, v.y ); } //---------------------------------------------------------------------- @@ -168,9 +168,9 @@ void CqBound::Encapsulate( const Imath::V2f& v ) std::ostream &operator<<( std::ostream &Stream, const CqBound &Bound ) { - CqVector3D min = Bound.vecMin(); - CqVector3D max = Bound.vecMax(); - CqVector3D cross = Bound.vecCross(); + Imath::V3f min = Bound.vecMin(); + Imath::V3f max = Bound.vecMax(); + Imath::V3f cross = Bound.vecCross(); Stream << min << "-->" << max << " | Cross: " << cross << std::ends; return ( Stream ); diff --git a/libs/core/bound.h b/libs/core/bound.h index d31edb4..b15051a 100644 --- a/libs/core/bound.h +++ b/libs/core/bound.h @@ -52,26 +52,26 @@ class CqBound { if ( pBounds ) { - m_vecMin.x( pBounds[ 0 ] ); - m_vecMin.y( pBounds[ 2 ] ); - m_vecMin.z( pBounds[ 4 ] ); - m_vecMax.x( pBounds[ 1 ] ); - m_vecMax.y( pBounds[ 3 ] ); - m_vecMax.z( pBounds[ 5 ] ); + m_vecMin.x = pBounds[ 0 ]; + m_vecMin.y = pBounds[ 2 ]; + m_vecMin.z = pBounds[ 4 ]; + m_vecMax.x = pBounds[ 1 ]; + m_vecMax.y = pBounds[ 3 ]; + m_vecMax.z = pBounds[ 5 ]; } } CqBound( TqFloat XMin = FLT_MAX, TqFloat YMin = FLT_MAX, TqFloat ZMin = FLT_MAX, TqFloat XMax = -FLT_MAX, TqFloat YMax = -FLT_MAX, TqFloat ZMax = -FLT_MAX ) { - m_vecMin.x( XMin ); - m_vecMin.y( YMin ); - m_vecMin.z( ZMin ); - m_vecMax.x( XMax ); - m_vecMax.y( YMax ); - m_vecMax.z( ZMax ); + m_vecMin.x = XMin; + m_vecMin.y = YMin; + m_vecMin.z = ZMin; + m_vecMax.x = XMax; + m_vecMax.y = YMax; + m_vecMax.z = ZMax; } - CqBound( const CqVector3D& vecMin, const CqVector3D& vecMax ) + CqBound( const Imath::V3f& vecMin, const Imath::V3f& vecMax ) { m_vecMin = vecMin; m_vecMax = vecMax; @@ -81,27 +81,27 @@ class CqBound ~CqBound() {} - const CqVector3D& vecMin() const + const Imath::V3f& vecMin() const { return ( m_vecMin ); } - CqVector3D& vecMin() + Imath::V3f& vecMin() { return ( m_vecMin ); } - const CqVector3D& vecMax() const + const Imath::V3f& vecMax() const { return ( m_vecMax ); } - CqVector3D& vecMax() + Imath::V3f& vecMax() { return ( m_vecMax ); } - CqVector3D vecCross() const + Imath::V3f vecCross() const { return( m_vecMax - m_vecMin ); } @@ -113,40 +113,40 @@ class CqBound TqFloat Volume2() const { - return( vecCross().Magnitude2() ); + return( vecCross().length2() ); } CqBound& operator=( const CqBound& From ); // Fills passed vector array with the 8 points of a bounding box - void getBoundCuboid(CqVector3D cuboid[8]); + void getBoundCuboid(Imath::V3f cuboid[8]); void Transform( const CqMatrix& matTransform ); void Encapsulate( const CqBound* const bound ); - void Encapsulate( const CqVector3D& v ); + void Encapsulate( const Imath::V3f& v ); void Encapsulate( const Imath::V2f& v ); bool Contains2D( const CqBound* const b ) const { - if ( ( b->vecMin().x() >= vecMin().x() && b->vecMax().x() <= vecMax().x() ) && - ( b->vecMin().y() >= vecMin().y() && b->vecMax().y() <= vecMax().y() ) ) + if ( ( b->vecMin().x >= vecMin().x && b->vecMax().x <= vecMax().x ) && + ( b->vecMin().y >= vecMin().y && b->vecMax().y <= vecMax().y ) ) return ( true ); else return ( false ); } - bool Contains3D( const CqVector3D& v ) const + bool Contains3D( const Imath::V3f& v ) const { - if ( ( v.x() >= m_vecMin.x() && v.x() <= m_vecMax.x() ) && - ( v.y() >= m_vecMin.y() && v.y() <= m_vecMax.y() ) && - ( v.z() >= m_vecMin.z() && v.z() <= m_vecMax.z() ) ) + if ( ( v.x >= m_vecMin.x && v.x <= m_vecMax.x ) && + ( v.y >= m_vecMin.y && v.y <= m_vecMax.y ) && + ( v.z >= m_vecMin.z && v.z <= m_vecMax.z ) ) return ( true ); else return ( false ); } bool Contains2D( const Imath::V2f& v ) const { - if ( ( v.x < m_vecMin.x() || v.x > m_vecMax.x() ) || - ( v.y < m_vecMin.y() || v.y > m_vecMax.y() ) ) + if ( ( v.x < m_vecMin.x || v.x > m_vecMax.x ) || + ( v.y < m_vecMin.y || v.y > m_vecMax.y ) ) return ( false ); else return ( true ); @@ -154,8 +154,8 @@ class CqBound bool Intersects( const Imath::V2f& min, const Imath::V2f& max ) const { - if( min.x > m_vecMax.x() || min.y > m_vecMax.y() || - max.x < m_vecMin.x() || max.y < m_vecMin.y() ) + if( min.x > m_vecMax.x || min.y > m_vecMax.y || + max.x < m_vecMin.x || max.y < m_vecMin.y ) return ( false ); else return ( true ); @@ -174,13 +174,13 @@ class CqBound bool outside = false; - CqVector3D p(m_vecMin.x(), m_vecMin.y(), m_vecMin.z()); + Imath::V3f p(m_vecMin.x, m_vecMin.y, m_vecMin.z); if (plane->whichSide(p) == CqPlane::Space_Positive) inside = true; else outside = true; - p.z(m_vecMax.... [truncated message content] |