Avara3D 0.2.0
C++ API reference
CylinderPhysicsShape.h
1//
2// CylinderPhysicsShape.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_CYLINDERPHYSICSSHAPE_H
10#define AVARA3D_PHYSICS_SHAPE_PRIMITIVE_CYLINDERPHYSICSSHAPE_H
11
12#include "a3d/physics/shape/PhysicsShape.h"
13
14namespace a3d {
15
18
19 public:
20 // [Public Lifecycle Functions]
21
24
25 // [Public Member Functions]
26
28 float radius() const;
29
31 float height() const;
32
33 // [Public PhysicsShape Member Functions]
34
36 Type type() const override;
37
43 void type(Type type) override;
44
45 private:
46 // [Private Member Variables]
47
48 float _radius;
49 float _height;
50 };
51
52}
53
54#endif // AVARA3D_PHYSICS_SHAPE_PRIMITIVE_CYLINDERPHYSICSSHAPE_H
Cylinder collision shape centered at the local origin and aligned along Y.
float height() const
Returns the configured full height along Y.
float radius() const
Returns the configured cylinder radius.
void type(Type type) override
Rejects attempts to change the fixed primitive shape type.
Type type() const override
Returns PhysicsShape::Type::Primitive.
CylinderPhysicsShape(float radius, float height)
Creates a cylinder collision shape with the supplied radius and full height.
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