Class BoxGeometry#

Inheritance Relationships#

Base Type#

Class Documentation#

class BoxGeometry : public Karana::Scene::AbstractStaticGeometry#

Concrete box geometry class.

See Scene layer for more discussion on the scene layer.

Public Functions

BoxGeometry(float width, float height, float depth)#

BoxGeometry constructor from side-lengths. The constructor is not meant to be called directly. Please use the corresponding create(…) method instead to create an instance.

Parameters:
  • width – side length in the x direction

  • height – side length in the y direction

  • depth – side length in the z direction

BoxGeometry(const BoxGeometry&)#

Copy constructor.

BoxGeometry &operator=(const BoxGeometry&) = delete#
BoxGeometry(BoxGeometry&&) = delete#
BoxGeometry &operator=(BoxGeometry&&) = delete#
virtual Karana::Core::ks_ptr<StaticMeshGeometry> computeMesh() const override#

Convert to a triangular mesh.

Returns:

The converted mesh

virtual Karana::Math::AABB aabb() const override#

Compute the axis-aligned bounding box (AABB).

Returns:

The AABB

Public Members

const float width#

side length in the x direction

const float height#

side length in the y direction

const float depth#

side length in the z direction

Public Static Functions

static Karana::Core::ks_ptr<BoxGeometry> create(float width, float height, float depth)#

Create a new instance of BoxGeometry from side-lengths.

Parameters:
  • width – side length in the x direction

  • height – side length in the y direction

  • depth – side length in the z direction

Returns:

A pointer to the newly created instance of BoxGeometry.