API Documentation
BoundingBox.h
1 // BoundingBox.h
3 //
5 
6 namespace nkGraphics
7 {
13  class BoundingBox final
14  {
15  public :
16 
20  BoundingBox () noexcept ;
26  BoundingBox (nkMemory::BufferView<const nkMaths::Vector> points) noexcept ;
33  BoundingBox (const nkMaths::Vector& center, float cubeHalfSide) noexcept ;
40  BoundingBox (const nkMaths::Vector& center, const nkMaths::Vector& axisAlignedHalfSides) noexcept ;
45 
46  // Getters
50  nkMemory::BufferView<const nkMaths::Vector> getPoints () const ;
54  nkMemory::BufferView<const nkMaths::Vector> getTransformedPoints () const ;
58  nkMaths::Vector getCenter () const ;
62  nkMaths::Vector getTransformedCenter () const ;
66  nkMaths::Vector getAxisAlignedSides () const ;
67 
68  // Setters
74  void setPoints (nkMemory::BufferView<const nkMaths::Vector> points) ;
82  void setTransformedPoints (nkMemory::BufferView<const nkMaths::Vector> points) ;
83 
84  // Updates
90  void updateTransformation (const nkMaths::Matrix& transform) ;
91 
92  // Checks
99  bool checkAgainst (const Frustum& frustum) const ;
100  } ;
101 }
nkGraphics::BoundingBox::setPoints
void setPoints(nkMemory::BufferView< const nkMaths::Vector > points)
nkGraphics::BoundingBox::getTransformedPoints
nkMemory::BufferView< const nkMaths::Vector > getTransformedPoints() const
nkGraphics::BoundingBox::updateTransformation
void updateTransformation(const nkMaths::Matrix &transform)
nkMaths
Encompasses all API of component NilkinsMaths.
Definition: IntVector.h:7
nkGraphics::BoundingBox
A bounding box. Often used to encompass object's bounds in the world.
Definition: BoundingBox.h:14
nkGraphics::BoundingBox::getPoints
nkMemory::BufferView< const nkMaths::Vector > getPoints() const
nkGraphics::BoundingBox::getCenter
nkMaths::Vector getCenter() const
nkGraphics::BoundingBox::BoundingBox
BoundingBox() noexcept
nkGraphics::Frustum
Defines a frustum.
Definition: Frustum.h:16
nkGraphics::BoundingBox::getTransformedCenter
nkMaths::Vector getTransformedCenter() const
nkGraphics::BoundingBox::setTransformedPoints
void setTransformedPoints(nkMemory::BufferView< const nkMaths::Vector > points)
nkGraphics
Encompasses all API of component NilkinsGraphics.
Definition: BoundingBox.h:7
nkGraphics::BoundingBox::getAxisAlignedSides
nkMaths::Vector getAxisAlignedSides() const
nkGraphics::BoundingBox::checkAgainst
bool checkAgainst(const Frustum &frustum) const
nkMemory
Encompasses all API of component NilkinsMemory.
Definition: Allocator.h:7