5 namespace AnyCAD{
namespace API{
78 return Vector3(x*vv, y*vv, z*vv);
85 return Vector3(x/vv, y/vv, z/vv);
140 int size()
const {
return int(m_arr.size());}
164 void resize(
int nSize){ m_arr.resize(nSize); }
192 : r(0), g(0), b(0), a(0)
197 : r(_r), g(_g), b(_b), a(_a)
202 :r(_r/255.0f), g(_g/255.0f), b(_b/255.0f), a(_a/255.0f)
209 return ((
long)(((
unsigned char)(r*255)|((
unsigned short)((
unsigned char)(g*255))<<8))|(((
unsigned char)(
unsigned short)(b*255))<<16)));
237 inline Real* operator[] (
size_t iRow)
const
239 return (
Real*)m[iRow];
266 inline Real* operator[] (
size_t iRow)
const
268 return (
Real*)m[iRow];
289 : minPt(_minPt), maxPt(_maxPt)
298 bool intersects(
const AABox& b2)
const;
300 bool intersects(
const Vector3& v)
const;
302 void transform(
const Matrix4& trf);
304 void Merge(
const AABox& b2);
329 void FromAngleAxis(
const Real& rfAngle,
const Vector3& rkAxis);
346 bool ToEulerAngles(EnumEularSequence sequence,
Vector3& euler)
const;
369 :mOrigin(origin), mDirection(direction) {}
393 return Vector3(mOrigin + (mDirection * t));
Vector3()
Definition: APIMath.h:44
Vector2(Real _x, Real _y)
Definition: APIMath.h:26
Real x
Definition: APIMath.h:317
void setDirection(const Vector3 &dir)
Definition: APIMath.h:383
Ray.
Definition: APIMath.h:364
Vector3 Y
Definition: APIMath.h:426
Vector3 getPoint(Real t) const
Definition: APIMath.h:392
AABox.
Definition: APIMath.h:281
Definition: APIMath.h:333
void * Handle
Definition: APIMath.h:8
static const Vector3 UNIT_Z
Definition: APIMath.h:123
Vector3 * ptr()
Definition: APIMath.h:154
Quaternion.
Definition: APIMath.h:313
float g
Definition: APIMath.h:187
Matrix4.
Definition: APIMath.h:248
Real z
Definition: APIMath.h:319
Vector3 maxPt
Definition: APIMath.h:285
Real w
Definition: APIMath.h:316
Vector3 operator-(const Vector3 &rhv) const
Definition: APIMath.h:55
Real y
Definition: APIMath.h:41
Vector3 X
Definition: APIMath.h:425
void Set(int row, int col, Real data)
Definition: APIMath.h:262
ColorValue()
Definition: APIMath.h:191
Real Get(int row, int col) const
Definition: APIMath.h:228
Coordinate.
Definition: APIMath.h:416
Vector3(Real _x, Real _y, Real _z)
Definition: APIMath.h:48
int size() const
Definition: APIMath.h:140
Point or vector.
Definition: APIMath.h:16
Vector3 operator*(Real vv) const
Definition: APIMath.h:76
Real z
Definition: APIMath.h:42
Real y
Definition: APIMath.h:20
Point of vector list.
Definition: APIMath.h:131
Vector3 operator*(const Vector3 &rhv) const
Definition: APIMath.h:69
Vector3 minPt
Definition: APIMath.h:284
Quaternion(Real _w, Real _x, Real _y, Real _z)
Definition: APIMath.h:322
Real Get(int row, int col) const
Definition: APIMath.h:257
Vector3 GetSize() const
Definition: APIMath.h:294
Matrix3.
Definition: APIMath.h:218
ColorValue(float _r, float _g, float _b, float _a)
Definition: APIMath.h:196
Definition: APIMath.h:334
Vector3 operator/(Real vv) const
Definition: APIMath.h:83
Vector3Arr m_arr
Definition: APIMath.h:175
Real x
Definition: APIMath.h:40
Vector3Arr & GetImpl()
Definition: APIMath.h:172
static const Vector3 ZERO
Definition: APIMath.h:120
static const Vector3 UNIT_Y
Definition: APIMath.h:122
Quaternion()
Definition: APIMath.h:321
Definition: APIMath.h:338
Vector3 operator+(const Vector3 &rhv) const
Definition: APIMath.h:62
float b
Definition: APIMath.h:188
std::pair< bool, Real > RayResult
Definition: APIMath.h:356
static const Vector3 UNIT_X
Definition: APIMath.h:121
float r
Definition: APIMath.h:186
void resize(int nSize)
Definition: APIMath.h:164
Vector3 Z
Definition: APIMath.h:427
Matrix4()
Definition: APIMath.h:253
long AsRGB() const
Definition: APIMath.h:207
Vector2()
Definition: APIMath.h:22
void clear()
Definition: APIMath.h:169
EnumEularSequence
Definition: APIMath.h:331
const Vector3 & getDirection(void) const
Definition: APIMath.h:387
Vector3 mOrigin
Definition: APIMath.h:405
AABox()
Definition: APIMath.h:287
const Vector3Arr & GetImpl() const
Definition: APIMath.h:171
Ray(const Vector3 &origin, const Vector3 &direction)
Definition: APIMath.h:368
Vector3 GetCenter() const
Definition: APIMath.h:296
ColorValue(int _r, int _g, int _b, int _a=255)
Definition: APIMath.h:201
Point or vector.
Definition: APIMath.h:37
Matrix3()
Definition: APIMath.h:224
Real x
Definition: APIMath.h:19
Vector3 Origion
Definition: APIMath.h:424
Definition: APIMath.h:335
AABox(const Vector3 &_minPt, const Vector3 &_maxPt)
Definition: APIMath.h:288
Vector3 mDirection
Definition: APIMath.h:406
Real y
Definition: APIMath.h:318
std::vector< Vector2 > Vector2List
Definition: APIMath.h:30
Definition: APIMath.h:337
float a
Definition: APIMath.h:189
Color Value.
Definition: APIMath.h:183
std::vector< Vector3 > Vector3Arr
Definition: APIMath.h:134
Definition: APIMath.h:336
void setOrigin(const Vector3 &origin)
Definition: APIMath.h:374
const Vector3 & getOrigin(void) const
Definition: APIMath.h:378
double Real
Definition: APIMath.h:7
void Set(int row, int col, Real data)
Definition: APIMath.h:233