Repository navigation
Vect4
Shmellyorc edited this page Aug 31, 2026
·
2 revisions
Vect4 is a 4D vector structure with floating-point components for homogeneous coordinates, quaternions, and other four-component spatial calculations.
| Field | Type | Description |
|---|---|---|
X |
float |
The X-component of the vector |
Y |
float |
The Y-component of the vector |
Z |
float |
The Z-component of the vector |
W |
float |
The W-component of the vector |
// Create from X, Y, Z, and W components
var v1 = new Vect4(10f, 20f, 5f, 1f);| Property | Description |
|---|---|
X |
The X-component of the vector |
Y |
The Y-component of the vector |
Z |
The Z-component of the vector |
W |
The W-component of the vector |
| Use Case | Description |
|---|---|
| Homogeneous coordinates | 3D transformations with W component |
| Quaternions | Rotation storage (X, Y, Z, W) |
| Color with alpha | RGBA color values |
| Shader uniforms | 4D vector uniforms for shaders |
Vect4 is commonly used for shader uniforms that require 4D vectors.
// Set a vec4 uniform in a shader
shader.SetUniform("uColor", new Vect4(1f, 0.5f, 0f, 1f));
shader.SetUniform("uQuaternion", new Vect4(0f, 0f, 0f, 1f));
shader.SetUniform("uPosition", new Vect4(10f, 20f, 5f, 1f));Vect4 is a simple immutable struct for 4D spatial calculations, commonly used for homogeneous coordinates, quaternions, colors with alpha, and shader uniforms.
| Feature | Support |
|---|---|
| X, Y, Z, W components | ✅ |
| Homogeneous coordinates | ✅ |
| Quaternion storage | ✅ |
| Color with alpha | ✅ |
| Shader uniform support | ✅ |
Home · Getting Started · Rendering · Custom Renderers · GitHub · Report an Issue
Built with VOID Engine · MIT License
- Coroutines
- State Machine
- Save System
- Pathfinding
- Logging
- Beacon Manager
- Beacon Event System
- Discoverable System
- Instance Helper
- BeaconManager Extensions
- BeaconHandle Extensions
- Enum Extensions
- String Extensions
- Int Extensions
- Float Extensions
- IEnumerable Extensions
- Random Extensions
- Sound Extensions
- Font Extensions