MCPcopy Create free account
hub / github.com/EricLengyel/Terathon-Math-Library / Point3D

Class Point3D

TSVector3D.h:366–447  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

364 /// \also Vector4D
365
366 class Point3D : public Vector3D
367 {
368 public:
369
370 TERATHON_API static const Origin3D origin;
371
372 /// \brief Default constructor that leaves the components uninitialized.
373
374 inline Point3D() = default;
375
376 /// \brief Constructor that sets components explicitly.
377 /// \param a,b,c The components of the point.
378
379 Point3D(float a, float b, float c) : Vector3D(a, b, c) {}
380
381 Point3D(const Vector2D& v) : Vector3D(v) {}
382 Point3D(const Vector2D& v, float c) : Vector3D(v, c) {}
383 explicit Point3D(const Vector3D& p) : Vector3D(p) {}
384
385 Point3D& operator =(const Vector3D& v)
386 {
387 xyz = v.xyz;
388 return (*this);
389 }
390
391 void operator =(const Vector3D& v) volatile
392 {
393 xyz = v.xyz;
394 }
395
396 Point3D& operator =(const Vector2D& v)
397 {
398 xy = v.xy;
399 z = 0.0F;
400 return (*this);
401 }
402
403 void operator =(const Vector2D& v) volatile
404 {
405 xy = v.xy;
406 z = 0.0F;
407 }
408
409 template <typename type>
410 Point3D& operator =(const Vec3D<type>& v)
411 {
412 x = float(v.x);
413 y = float(v.y);
414 z = float(v.z);
415 return (*this);
416 }
417
418 Point3D& operator +=(const Vector3D& v)
419 {
420 xyz += v.xyz;
421 return (*this);
422 }
423

Callers 10

UnitizeFunction · 0.85
ProjectFunction · 0.85
operator -Function · 0.85
operator +Function · 0.85
operator *Function · 0.85
operator /Function · 0.85
GetPositionMethod · 0.85
operator *Method · 0.85
InverseTransformMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected