Arrow
Visual debug primitive representing a 3D arrow.
Arrow is a scene node that renders a directional arrow from a given origin, primarily used for debugging, orientation helpers, or coordinate indicators. It is constructed from a shaft and cone head, scaled based on the provided length.
The arrow can be positioned using SetOrigin() and oriented using SetDirection().
cpp
auto arrow = vglx::Arrow::Create({
.direction = {1.0f, 0.0f, 0.0f},
.origin = Vector3::Zero(),
.color = 0xFF0000,
.length = 1.0f
});
scene->Add(arrow);INFO
Derives from Node and inherits all public properties and methods.
Construction
Constructors
Arrow()
Constructs an Arrow object.
cpp
Arrow::Arrow(const Parameters& params);| Parameter | Description |
|---|---|
| params | Arrow::Parameters |
Factories preferred
Arrow::Create() auto
Creates a shared pointer to an Arrow object.
cpp
static auto Arrow::Create(const Parameters& params);| Parameter | Description |
|---|---|
| params | Arrow::Parameters |
Types
Arrow::Parameters struct
Functions
SetDirection() void
Sets the direction of the arrow.
cpp
void Arrow::SetDirection(const Vector3& direction);| Parameter | Description |
|---|---|
| direction | Direction of the arrow. |
SetOrigin() void
Sets the origin of the arrow.
cpp
void Arrow::SetOrigin(const Vector3& origin);| Parameter | Description |
|---|---|
| origin | Origin of the arrow. |