Avara3D 0.2.0
C++ API reference
BoxPhysicsShape.h
1//
2// BoxPhysicsShape.h
3// avara3d
4//
5// Created by Morgan Davis on 11/19/23.
6// Copyright © 2026 Morgan K Davis. All rights reserved.
7//
8
9#ifndef AVARA3D_PHYSICS_SHAPE_PRIMITIVE_BOXPHYSICSSHAPE_H
10#define AVARA3D_PHYSICS_SHAPE_PRIMITIVE_BOXPHYSICSSHAPE_H
11
12#include "a3d/physics/shape/PhysicsShape.h"
13
14namespace a3d {
15
18
19 public:
20 // [Public Lifecycle Functions]
21
23 BoxPhysicsShape(float width, float height, float length);
24
25 // [Public Member Functions]
26
28 float width() const;
29
31 float height() const;
32
34 float length() const;
35
36 // [Public PhysicsShape Member Functions]
37
39 Type type() const override;
40
46 void type(Type type) override;
47
48 private:
49 // [Private Member Variables]
50
51 float _width;
52 float _height;
53 float _length;
54 };
55
56}
57
58#endif // AVARA3D_PHYSICS_SHAPE_PRIMITIVE_BOXPHYSICSSHAPE_H
Box collision shape centered at the local origin, with width along X, height along Y,...
Type type() const override
Returns PhysicsShape::Type::Primitive.
float length() const
Returns the configured full length along Z.
float width() const
Returns the configured full width along X.
BoxPhysicsShape(float width, float height, float length)
Creates a box collision shape with the supplied full dimensions.
float height() const
Returns the configured full height along Y.
void type(Type type) override
Rejects attempts to change the fixed primitive shape type.
Describes collision geometry used by one or more PhysicsBody objects.
Definition: PhysicsShape.h:37
Type
Collision-geometry representation requested for a PhysicsShape.
Definition: PhysicsShape.h:43