Kemena3D
Loading...
Searching...
No Matches
kemena Namespace Reference

Top-level Kemena3D engine namespace. More...

Namespaces

namespace  kScriptGraphCompiler
 Compiles a node graph into AngelScript source text.

Classes

struct  kAABB
 Axis-aligned bounding box (min/max in the same space). More...
class  kAnimation
 Non-skeletal animation clip — collection of per-object tracks. More...
class  kAnimator
 Controls playback of animation clips. More...
class  kAssetManager
 Central asset-loading and cache manager. More...
class  kAudio
 Represents a loaded audio clip that can be played, stopped, and positioned. More...
struct  kAudioListener
 Marks a scene object as the audio listener (typically the main camera). More...
class  kAudioManager
 Owns the miniaudio engine and acts as a factory for kAudio instances. More...
struct  kAudioSource
 Describes an audio emitter attached to a scene object. More...
class  kBone
 Represents one bone in a skeletal animation. More...
struct  kBoneInfo
 Stores the per-bone offset matrix and its index in the palette. More...
class  kCamera
 Scene-graph camera node. More...
class  kCharacterController
 Runtime wrapper around a Jolt character. More...
struct  kCharacterControllerDesc
 Editor-authored description of a character controller. More...
class  kDriver
 Pure-virtual graphics driver interface. More...
class  kFileByteStream
 Minimal file-backed asIBinaryStream for bytecode I/O. More...
struct  kFontGlyph
 Glyph metrics for a single character in a bitmap font atlas. More...
class  kFrustum
 View frustum defined by six planes extracted from a view-projection matrix. More...
class  kGuiManager
 Wraps Dear ImGui initialisation, event forwarding, and widget calls. More...
struct  kKeyPosition
 A single position keyframe for skeletal animation. More...
struct  kKeyRotation
 A single rotation keyframe for skeletal animation. More...
struct  kKeyScale
 A single scale keyframe for skeletal animation. More...
class  kLight
 Scene-graph node that emits light. More...
class  kMaterial
 Groups a shader program with textures and surface parameters. More...
class  kMD5
 Streaming MD5 message-digest implementation. More...
class  kMesh
 Scene-graph node that holds renderable geometry. More...
class  kMeshGenerator
 Procedural mesh generators — no file I/O, no asset manager needed. More...
class  kNavAgent
 A single crowd agent managed by kNavManager. More...
struct  kNavAgentConfig
 Per-agent parameters passed to dtCrowd on creation. More...
struct  kNavBuildConfig
 All parameters that control the Recast bake pipeline. More...
 Defines a traversable shortcut between two navmesh points. More...
class  kNavManager
 Owns a dtCrowd and a dtTileCache update loop for a single kNavMesh. More...
class  kNavMesh
 A baked navigation mesh used for pathfinding and obstacle simulation. More...
struct  kNavMeshDesc
 Serialisable settings for a navigation surface attached to an object in the editor. More...
class  kNavObstacle
 A dynamic cylinder obstacle carved into the navmesh at runtime. More...
struct  kNodeData
 Node in a skeletal-animation hierarchy (one per scene-graph joint). More...
class  kObject
 Base scene-graph node. More...
struct  kObjectAnimTrack
 A single transform track for one target object inside a clip. More...
class  kOctree
 Loose octree that spatially indexes scene meshes for frustum culling. More...
class  kOffscreenRenderer
 Renders to an offscreen FBO for thumbnails, previews, and image export. More...
class  kOpenGLDriver
 OpenGL 3.3 Core Profile graphics driver. More...
struct  kParticle
 Data descriptor for a single particle system attached to a scene object. More...
class  kParticleManager
 Manages active particle emitters at runtime. More...
class  kPhysicsManager
 Owns the Jolt PhysicsSystem and manages the lifecycle of all physics bodies. More...
class  kPhysicsObject
 Represents a single rigid body or trigger volume inside the physics simulation. More...
struct  kPhysicsObjectDesc
 All parameters needed to create a kPhysicsObject. More...
struct  kPhysicsRaycastHit
 Result of a physics raycast query. More...
struct  kPhysicsShapeDesc
 Parameters that fully describe a collision shape. More...
class  kPrefab
 A serialized object subtree saved as a .prefab JSON asset. More...
class  kRenderer
 Orchestrates the full render pipeline for a scene. More...
class  kScene
 Holds all objects, lights, and rendering settings for one scene. More...
struct  kScript
 Per-object script component descriptor. More...
struct  kScriptAsset
 A registered script asset: a compilable unit of script source. More...
struct  kScriptGraph
 The complete editable node graph for one script. More...
 A directed wire from an output pin to an input pin. More...
struct  kScriptGraphNode
 A single graph node with its input/output pins and payload. More...
struct  kScriptGraphPin
 A connection point on a node. More...
struct  kScriptGraphResult
 Result of compiling a graph to AngelScript text. More...
struct  kScriptGraphVar
 A graph-scope variable, emitted as an AngelScript global. More...
struct  kScriptInstance
 A live, per-object compiled script module. More...
class  kScriptManager
 Manages the AngelScript engine, a registry of script assets, and the live per-object script module instances. More...
class  kShader
 Wraps a compiled GLSL shader program. More...
class  kShaderCompiler
 Compiles a kShaderGraph into combined GLSL source. More...
struct  kShaderCompileResult
 Result of compiling a shader graph into GLSL. More...
struct  kShaderGraph
 A complete node-based shader graph: nodes, links, and identity. More...
 A directed edge connecting an output pin to an input pin. More...
struct  kShaderNode
 A node in the shader graph: a typed operation with input/output pins. More...
struct  kShaderPin
 A single input or output connection point on a shader node. More...
struct  kShaderSource
 Holds the split stages of a combined shader source. More...
class  kSkeletalAnimation
 A single skeletal animation clip (bone channels + node hierarchy). More...
struct  kSystemEvent
 Wraps an SDL_Event and provides helper accessors for input polling. More...
class  kTexture
 Base GPU texture abstraction shared by kTexture2D and kTextureCube. More...
class  kTexture2D
 Extends kTexture with 2D-specific metadata and optional CPU-side pixel data. More...
class  kTextureCube
 Represents a six-face cube-map texture. More...
class  kTimer
 Measures elapsed time between consecutive frames. More...
struct  kVertexInfo
 Full per-vertex data layout used internally by the asset manager. More...
class  kWindow
 Creates and manages an SDL3 application window. More...
class  kWorld
 Root container for the entire simulation environment. More...

Typedefs

using kJson = nlohmann::json
Math type aliases
typedef glm::vec2 kVec2
 2-component float vector.
typedef glm::vec3 kVec3
 3-component float vector.
typedef glm::vec4 kVec4
 4-component float vector.
typedef glm::ivec2 kIvec2
 2-component integer vector.
typedef glm::ivec3 kIvec3
 3-component integer vector.
typedef glm::ivec4 kIvec4
 4-component integer vector.
typedef glm::mat3 kMat3
 3x3 float matrix.
typedef glm::mat4 kMat4
 4x4 float matrix.
typedef glm::quat kQuat
 Unit quaternion.
typedef std::string kString
 Standard string alias.

Enumerations

enum  kRendererType { RENDERER_GL }
 Identifies the graphics backend used by kRenderer. More...
enum class  kRenderMode {
  RENDER_MODE_FULL = 0 , RENDER_MODE_ALBEDO = 1 , RENDER_MODE_NORMALS = 2 , RENDER_MODE_WIREFRAME = 3 ,
  RENDER_MODE_DEPTH = 4 , RENDER_MODE_OBJECT_IDS = 5 , RENDER_MODE_FULL_WIREFRAME = 6
}
 Selects the debug visualization mode for the scene viewport. More...
enum  kWindowType { WINDOW_DEFAULT , WINDOW_FULLSCREEN , WINDOW_BORDERLESS }
 Window creation mode. More...
enum  kNodeType { NODE_TYPE_OBJECT , NODE_TYPE_MESH , NODE_TYPE_CAMERA , NODE_TYPE_LIGHT }
 Scene-graph node type tag. More...
enum  kCameraType { CAMERA_TYPE_FREE , CAMERA_TYPE_LOCKED }
 Camera behaviour mode. More...
enum  kTransparentType { TRANSP_TYPE_NONE , TRANSP_TYPE_BLEND }
 Transparency/blending mode for a material. More...
enum  kLightType { LIGHT_TYPE_SUN , LIGHT_TYPE_POINT , LIGHT_TYPE_SPOT }
 Light source variety. More...
enum  kTextureFormat { TEX_FORMAT_RGB , TEX_FORMAT_RGBA , TEX_FORMAT_SRGB , TEX_FORMAT_SRGBA }
 Texture upload format (internal precision / colour-space). More...
enum  kTextureType { TEX_TYPE_2D , TEX_TYPE_CUBE }
 Distinguishes 2D from cube-map textures. More...
enum class  kBlendFactor {
  ZERO , ONE , SRC_ALPHA , ONE_MINUS_SRC_ALPHA ,
  SRC_COLOR , ONE_MINUS_SRC_COLOR , DST_ALPHA , ONE_MINUS_DST_ALPHA
}
 Source/destination blend factors for alpha blending. More...
enum class  kCullMode { BACK , FRONT , FRONT_AND_BACK }
 Which polygon faces to cull. More...
enum class  kFrontFace { CCW , CW }
 Winding order that defines the front face of a polygon. More...
enum class  kPrimitiveType {
  TRIANGLES , TRIANGLE_STRIP , TRIANGLE_FAN , LINES ,
  LINE_STRIP , POINTS
}
 Primitive topology for draw calls. More...
enum class  kNavPartitionType { Watershed , Monotone , Layers }
 Partition algorithm used during Recast region building. More...
enum class  kFrustumTestResult { Outside , Intersecting , Inside }
 Result of testing a volume against a view frustum. More...
enum class  kPhysicsShapeType {
  Sphere , Box , Capsule , Cylinder ,
  ConvexHull , Mesh , Plane
}
 Collision shape type. More...
enum class  kPhysicsObjectType { Dynamic , Static , Kinematic , Trigger }
 Determines how the physics engine moves (or does not move) a body. More...
enum class  kScriptPinType {
  Exec = 0 , Float , Bool , String ,
  Vec3 , Object
}
 Kind/type of a node pin. Exec pins carry control flow; the rest carry typed data values. More...
enum class  kScriptNodeType {
  EventAwake = 0 , EventStart , EventUpdate , EventFixedUpdate ,
  EventLateUpdate , EventOnDestroy , Branch , Print ,
  SetPosition , SetRotation , SetScale , Translate ,
  Rotate , SetActive , SetVariable , GetSelf ,
  GetPosition , GetRotation , GetScale , GetForward ,
  GetRight , GetUp , GetDeltaTime , GetVariable ,
  LiteralFloat , LiteralBool , LiteralString , LiteralVec3 ,
  Add , Subtract , Multiply , Divide ,
  MakeVec3 , BreakVec3 , ScaleVec3 , Greater ,
  Less , Equal , And , Or ,
  Not , Count
}
 Every node kind the visual scripting graph supports. More...
enum  kScriptSourceType { K_SCRIPT_TEXT = 0 , K_SCRIPT_NODEGRAPH = 1 }
 How a script asset's source is authored. More...
enum  kScriptEvent {
  K_SCRIPT_AWAKE = 0 , K_SCRIPT_START , K_SCRIPT_UPDATE , K_SCRIPT_FIXED_UPDATE ,
  K_SCRIPT_LATE_UPDATE , K_SCRIPT_ON_ENABLE , K_SCRIPT_ON_DISABLE , K_SCRIPT_ON_DESTROY ,
  K_SCRIPT_EVENT_COUNT
}
 Lifecycle events dispatched to every active script each frame. More...
enum class  kPinType {
  Float , Vec2 , Vec3 , Vec4 ,
  Sampler2D , SamplerCube
}
 Data type carried by a shader-node pin (link/connection type). More...
enum class  kShaderNodeType {
  ConstFloat , ConstVec2 , ConstVec3 , ConstVec4 ,
  UVCoord , Time , VertexColor , WorldPosition ,
  ViewDirection , VertexNormal , Texture2D , TextureCube ,
  Add , Subtract , Multiply , Divide ,
  Dot , Cross , Normalize , Length ,
  Clamp , Mix , Pow , Abs ,
  Floor , Ceil , Fract , Sqrt ,
  Min , Max , Step , Smoothstep ,
  OneMinus , Split , Combine , Swizzle ,
  MaterialTiling , MaterialAmbient , MaterialDiffuse , MaterialSpecular ,
  MaterialShininess , MaterialMetallic , MaterialRoughness , OutputFlat ,
  OutputPhong , OutputPBR
}
 Identifies the kind of operation a shader graph node performs. More...

Functions

kString generateFileChecksum (const kString &fileName)
 Computes an MD5 checksum of the given file.
kString generateRandomString (int stringLength)
 Generates a cryptographically random alphanumeric kString.
kString generateUuid ()
 Generates a random UUID v4 kString.
KEMENA3D_API kWindowcreateWindow (int width, int height, kString title, bool maximized=false, kWindowType type=kWindowType::WINDOW_DEFAULT, void *nativeHandle=nullptr)
 Create and initialise a new application window.
KEMENA3D_API kRenderercreateRenderer (kWindow *window)
 Create and initialise the renderer for a given window.
KEMENA3D_API kAssetManagercreateAssetManager ()
 Create a new asset manager.
KEMENA3D_API kWorldcreateWorld (kAssetManager *assetManager)
 Create a new world (scene) bound to an asset manager.
KEMENA3D_API kScriptManagercreateScriptManager ()
 Create a new script manager.
KEMENA3D_API kGuiManagercreateGuiManager (kRenderer *renderer)
 Create and initialise a GUI manager for a given renderer.
KEMENA3D_API kAudioManagercreateAudioManager ()
 Create and initialise the audio manager.
KEMENA3D_API kPhysicsManagercreatePhysicsManager ()
 Create and initialise the physics manager.
KEMENA3D_API kNavManagercreateNavManager (kNavMesh *mesh, int maxAgents=128)
 Create and initialise a navigation manager for a navigation mesh.
uint32_t F (uint32_t x, uint32_t y, uint32_t z)
 MD5 auxiliary function F used in round 1: (x & y) | (~x & z).
uint32_t G (uint32_t x, uint32_t y, uint32_t z)
 MD5 auxiliary function G used in round 2: (x & z) | (y & ~z).
uint32_t H (uint32_t x, uint32_t y, uint32_t z)
 MD5 auxiliary function H used in round 3: x ^ y ^ z.
uint32_t I (uint32_t x, uint32_t y, uint32_t z)
 MD5 auxiliary function I used in round 4: y ^ (x | ~z).
uint32_t rotate_left (uint32_t x, int n)
 Performs a circular left rotation of a 32-bit value.
void FF (uint32_t &a, uint32_t b, uint32_t c, uint32_t d, uint32_t x, uint32_t s, uint32_t ac)
 Round-1 transformation step using the F mixing function.
void GG (uint32_t &a, uint32_t b, uint32_t c, uint32_t d, uint32_t x, uint32_t s, uint32_t ac)
 Round-2 transformation step using the G mixing function.
void HH (uint32_t &a, uint32_t b, uint32_t c, uint32_t d, uint32_t x, uint32_t s, uint32_t ac)
 Round-3 transformation step using the H mixing function.
void II (uint32_t &a, uint32_t b, uint32_t c, uint32_t d, uint32_t x, uint32_t s, uint32_t ac)
 Round-4 transformation step using the I mixing function.
void encode (uint8_t *output, const uint32_t *input, size_t length)
 Serialises 32-bit words into bytes in little-endian order.
void decode (uint32_t *output, const uint8_t *input, size_t length)
 Reassembles bytes into 32-bit words assuming little-endian order.
KEMENA3D_API void registerScriptBindings (kScriptManager *manager)
 Registers all host types and functions on manager's engine.
KEMENA3D_API const char * kScriptNodeTypeName (kScriptNodeType type)
 Human-readable label for a node type (used by the editor menu).
KEMENA3D_API const char * kScriptEventDecl (kScriptEvent evt)
 AngelScript declaration string for each kScriptEvent (indexed by enum).
const char * kPinTypeName (kPinType t)
 Returns the GLSL type keyword for a pin type.
bool kPinCompatible (kPinType from, kPinType to)
 Tests whether an output pin type may feed into an input pin type.

Variables

const kString engineName = "Kemena3D"
 Human-readable engine name, reported to the renderer/backend.
const uint32_t engineVersion = 1
 Engine version number, reported to the renderer/backend.

Detailed Description

Top-level Kemena3D engine namespace.

Aggregates the public engine headers and exposes the high-level factory functions used to bootstrap an application: creating the window, renderer, and the various subsystem managers (assets, world, scripting, GUI, audio, physics, navigation).

Typedef Documentation

◆ kIvec2

typedef glm::ivec2 kemena::kIvec2

2-component integer vector.

◆ kIvec3

typedef glm::ivec3 kemena::kIvec3

3-component integer vector.

◆ kIvec4

typedef glm::ivec4 kemena::kIvec4

4-component integer vector.

◆ kJson

using kemena::kJson = nlohmann::json

◆ kMat3

typedef glm::mat3 kemena::kMat3

3x3 float matrix.

◆ kMat4

typedef glm::mat4 kemena::kMat4

4x4 float matrix.

◆ kQuat

typedef glm::quat kemena::kQuat

Unit quaternion.

◆ kString

typedef std::string kemena::kString

Standard string alias.

◆ kVec2

typedef glm::vec2 kemena::kVec2

2-component float vector.

◆ kVec3

typedef glm::vec3 kemena::kVec3

3-component float vector.

◆ kVec4

typedef glm::vec4 kemena::kVec4

4-component float vector.

Enumeration Type Documentation

◆ kBlendFactor

enum class kemena::kBlendFactor
strong

Source/destination blend factors for alpha blending.

Enumerator
ZERO 

Factor = 0.

ONE 

Factor = 1.

SRC_ALPHA 

Factor = source alpha.

ONE_MINUS_SRC_ALPHA 

Factor = 1 - source alpha.

SRC_COLOR 

Factor = source colour.

ONE_MINUS_SRC_COLOR 

Factor = 1 - source colour.

DST_ALPHA 

Factor = destination alpha.

ONE_MINUS_DST_ALPHA 

Factor = 1 - destination alpha.

◆ kCameraType

Camera behaviour mode.

Enumerator
CAMERA_TYPE_FREE 

Free-fly; position and orientation are set independently.

CAMERA_TYPE_LOCKED 

Orbit; always looks at a fixed target point.

◆ kCullMode

enum class kemena::kCullMode
strong

Which polygon faces to cull.

Enumerator
BACK 

Cull back-facing polygons.

FRONT 

Cull front-facing polygons.

FRONT_AND_BACK 

Cull all polygons (geometry only, still runs shaders).

◆ kFrontFace

enum class kemena::kFrontFace
strong

Winding order that defines the front face of a polygon.

Enumerator
CCW 

Counter-clockwise winding = front face.

CW 

Clockwise winding = front face.

◆ kFrustumTestResult

enum class kemena::kFrustumTestResult
strong

Result of testing a volume against a view frustum.

Enumerator
Outside 

Volume lies entirely outside the frustum.

Intersecting 

Volume straddles one or more frustum planes.

Inside 

Volume lies entirely inside all six planes.

◆ kLightType

Light source variety.

Enumerator
LIGHT_TYPE_SUN 

Directional (infinite-distance) light.

LIGHT_TYPE_POINT 

Omnidirectional point light.

LIGHT_TYPE_SPOT 

Cone-shaped spotlight.

◆ kNavPartitionType

enum class kemena::kNavPartitionType
strong

Partition algorithm used during Recast region building.

Selects how the walkable heightfield is divided into regions, trading bake speed against mesh quality.

Enumerator
Watershed 

Best quality; slower on complex geometry.

Monotone 

Fast; lower quality on open areas.

Layers 

Best for very flat/layered geometry.

◆ kNodeType

Scene-graph node type tag.

Enumerator
NODE_TYPE_OBJECT 

Generic empty object.

NODE_TYPE_MESH 

Renderable mesh.

NODE_TYPE_CAMERA 

Camera.

NODE_TYPE_LIGHT 

Light source.

◆ kPhysicsObjectType

enum class kemena::kPhysicsObjectType
strong

Determines how the physics engine moves (or does not move) a body.

Enumerator
Dynamic 

Full rigid-body simulation (affected by forces and gravity).

Static 

Immovable; used for world geometry and terrain.

Kinematic 

Moved via setPosition / setVelocity; not affected by forces.

Trigger 

Detects overlaps but exerts no physical response.

◆ kPhysicsShapeType

enum class kemena::kPhysicsShapeType
strong

Collision shape type.

Enumerator
Sphere 

Uniform sphere defined by radius.

Box 

Axis-aligned box defined by half-extents.

Capsule 

Capsule (cylinder + hemispherical end-caps) defined by radius + total height.

Cylinder 

Cylinder defined by radius + total height.

ConvexHull 

Convex hull of the object's mesh vertices; any motion type.

Mesh 

Triangle mesh from the object's mesh; static-only (Jolt restriction).

Plane 

Infinite plane (object's local +Y); static-only (Jolt restriction).

◆ kPinType

enum class kemena::kPinType
strong

Data type carried by a shader-node pin (link/connection type).

Determines the GLSL type of the value flowing through a pin and which connections are allowed (see kPinCompatible).

Enumerator
Float 

Scalar float.

Vec2 

2-component vector.

Vec3 

3-component vector.

Vec4 

4-component vector.

Sampler2D 

2D texture sampler.

SamplerCube 

Cube-map texture sampler.

◆ kPrimitiveType

enum class kemena::kPrimitiveType
strong

Primitive topology for draw calls.

Enumerator
TRIANGLES 

Independent triangles (3 vertices each).

TRIANGLE_STRIP 

Triangle strip.

TRIANGLE_FAN 

Triangle fan.

LINES 

Independent line segments (2 vertices each).

LINE_STRIP 

Connected line strip.

POINTS 

Individual point sprites.

◆ kRendererType

Identifies the graphics backend used by kRenderer.

Enumerator
RENDERER_GL 

OpenGL renderer.

◆ kRenderMode

enum class kemena::kRenderMode
strong

Selects the debug visualization mode for the scene viewport.

Enumerator
RENDER_MODE_FULL 

Normal fully-lit render.

RENDER_MODE_ALBEDO 

Albedo / diffuse texture only, no lighting.

RENDER_MODE_NORMALS 

World normals visualized as RGB.

RENDER_MODE_WIREFRAME 

Flat-color wireframe only.

RENDER_MODE_DEPTH 

Linearized depth as greyscale.

RENDER_MODE_OBJECT_IDS 

Color-coded object ID picking buffer.

RENDER_MODE_FULL_WIREFRAME 

Full lit render with wireframe overlay.

◆ kScriptEvent

Lifecycle events dispatched to every active script each frame.

The integer order matters: K_SCRIPT_EVENT_COUNT must stay last so it can size per-instance arrays.

Enumerator
K_SCRIPT_AWAKE 

void Awake() — once, before any Start().

K_SCRIPT_START 

void Start() — once, on the first frame.

K_SCRIPT_UPDATE 

void Update() — every frame.

K_SCRIPT_FIXED_UPDATE 

void FixedUpdate() — every fixed (physics) step.

K_SCRIPT_LATE_UPDATE 

void LateUpdate() — every frame, after Update().

K_SCRIPT_ON_ENABLE 

void OnEnable() — when the component activates.

K_SCRIPT_ON_DISABLE 

void OnDisable() — when the component deactivates.

K_SCRIPT_ON_DESTROY 

void OnDestroy() — when the instance is torn down.

K_SCRIPT_EVENT_COUNT 

Sentinel — number of lifecycle events.

◆ kScriptNodeType

enum class kemena::kScriptNodeType
strong

Every node kind the visual scripting graph supports.

Enumerator
EventAwake 

Emits the Awake lifecycle function.

EventStart 

Emits the Start lifecycle function.

EventUpdate 

Emits the Update lifecycle function.

EventFixedUpdate 

Emits the FixedUpdate lifecycle function.

EventLateUpdate 

Emits the LateUpdate lifecycle function.

EventOnDestroy 

Emits the OnDestroy lifecycle function.

Branch 

if/else on a Bool condition.

Print 

Logs a value to the console.

SetPosition 

Sets the object's world position.

SetRotation 

Sets the object's rotation.

SetScale 

Sets the object's scale.

Translate 

Offsets the object's position by a vector.

Rotate 

Rotates the object by a vector.

SetActive 

Enables/disables the object.

SetVariable 

Assigns a graph variable.

GetSelf 

The object the script is attached to.

GetPosition 

Reads the object's world position.

GetRotation 

Reads the object's rotation.

GetScale 

Reads the object's scale.

GetForward 

The object's forward axis.

GetRight 

The object's right axis.

GetUp 

The object's up axis.

GetDeltaTime 

Frame delta time.

GetVariable 

Reads a graph variable.

LiteralFloat 

Constant float value.

LiteralBool 

Constant bool value.

LiteralString 

Constant string value.

LiteralVec3 

Constant Vec3 value.

Add 

a + b.

Subtract 

a - b.

Multiply 

a * b.

Divide 

a / b.

MakeVec3 

Combines three floats into a Vec3.

BreakVec3 

Splits a Vec3 into three floats.

ScaleVec3 

Vec3 * Float.

Greater 

a > b.

Less 

a < b.

Equal 

a == b.

And 

Logical AND.

Or 

Logical OR.

Not 

Logical negation.

Count 

Sentinel (number of node types).

◆ kScriptPinType

enum class kemena::kScriptPinType
strong

Kind/type of a node pin. Exec pins carry control flow; the rest carry typed data values.

Enumerator
Exec 

Execution (control-flow) wire.

Float 

Floating-point value.

Bool 

Boolean value.

String 

Text value.

Vec3 

3-component vector value.

Object 

kObject handle.

◆ kScriptSourceType

How a script asset's source is authored.

Enumerator
K_SCRIPT_TEXT 

Hand-written AngelScript text (.as).

K_SCRIPT_NODEGRAPH 

Visual node graph; sourcePath points at its generated .as.

◆ kShaderNodeType

enum class kemena::kShaderNodeType
strong

Identifies the kind of operation a shader graph node performs.

Named kShaderNodeType (rather than kNodeType) to avoid clashing with the scene-graph node enum in kdatatype.h. Values are grouped into constant/ built-in inputs, texture sampling, arithmetic, vector construction, material property inputs, and shader outputs.

Enumerator
ConstFloat 

User-supplied constant float.

ConstVec2 

User-supplied constant vec2.

ConstVec3 

User-supplied constant vec3.

ConstVec4 

User-supplied constant vec4.

UVCoord 

Interpolated texture coordinates.

Time 

Elapsed time uniform.

VertexColor 

Per-vertex color attribute.

WorldPosition 

Fragment world-space position.

ViewDirection 

Direction from fragment toward the camera.

VertexNormal 

Interpolated surface normal.

Texture2D 

Sample a 2D texture.

TextureCube 

Sample a cube-map texture.

Add 

a + b.

Subtract 

a - b.

Multiply 

a * b.

Divide 

a / b.

Dot 

Dot product.

Cross 

Cross product.

Normalize 

Normalize a vector.

Length 

Vector length.

Clamp 

Clamp value between min and max.

Mix 

Linear interpolation (lerp).

Pow 

Raise base to an exponent.

Abs 

Absolute value.

Floor 

Round down to integer.

Ceil 

Round up to integer.

Fract 

Fractional part.

Sqrt 

Square root.

Min 

Component-wise minimum.

Max 

Component-wise maximum.

Step 

Step function (0 or 1 about an edge).

Smoothstep 

Smooth Hermite interpolation between edges.

OneMinus 

1 - value.

Split 

Decompose a vector into its components.

Combine 

Assemble scalars into a vector.

Swizzle 

Reorder/select components via a mask.

MaterialTiling 

Material UV tiling factor.

MaterialAmbient 

Material ambient color.

MaterialDiffuse 

Material diffuse color.

MaterialSpecular 

Material specular color.

MaterialShininess 

Material shininess exponent.

MaterialMetallic 

Material metallic factor (PBR).

MaterialRoughness 

Material roughness factor (PBR).

OutputFlat 

Unlit/flat shading output.

OutputPhong 

Phong lit output (requires lights).

OutputPBR 

Physically based output (requires lights).

◆ kTextureFormat

Texture upload format (internal precision / colour-space).

Enumerator
TEX_FORMAT_RGB 

8-bit RGB, linear colour-space.

TEX_FORMAT_RGBA 

8-bit RGBA, linear colour-space.

TEX_FORMAT_SRGB 

8-bit RGB, sRGB colour-space (gamma-corrected).

TEX_FORMAT_SRGBA 

8-bit RGBA, sRGB colour-space.

◆ kTextureType

Distinguishes 2D from cube-map textures.

Enumerator
TEX_TYPE_2D 

Standard 2-dimensional texture.

TEX_TYPE_CUBE 

Cube-map texture (six faces).

◆ kTransparentType

Transparency/blending mode for a material.

Enumerator
TRANSP_TYPE_NONE 

Opaque — no blending.

TRANSP_TYPE_BLEND 

Alpha blending (src-alpha / one-minus-src-alpha).

◆ kWindowType

Window creation mode.

Enumerator
WINDOW_DEFAULT 

Normal windowed mode.

WINDOW_FULLSCREEN 

Exclusive fullscreen.

WINDOW_BORDERLESS 

Borderless/windowed fullscreen.

Function Documentation

◆ createAssetManager()

KEMENA3D_API kAssetManager * kemena::createAssetManager ( )

Create a new asset manager.

Returns
Pointer to a newly allocated kAssetManager.

◆ createAudioManager()

KEMENA3D_API kAudioManager * kemena::createAudioManager ( )

Create and initialise the audio manager.

Returns
Pointer to the initialised kAudioManager.

◆ createGuiManager()

KEMENA3D_API kGuiManager * kemena::createGuiManager ( kRenderer * renderer)

Create and initialise a GUI manager for a given renderer.

Parameters
rendererThe renderer the GUI will be drawn with.
Returns
Pointer to the initialised kGuiManager.

◆ createNavManager()

KEMENA3D_API kNavManager * kemena::createNavManager ( kNavMesh * mesh,
int maxAgents = 128 )

Create and initialise a navigation manager for a navigation mesh.

Parameters
meshThe navigation mesh agents will path over.
maxAgentsMaximum number of simultaneous crowd agents (default: 128).
Returns
Pointer to the initialised kNavManager.

◆ createPhysicsManager()

KEMENA3D_API kPhysicsManager * kemena::createPhysicsManager ( )

Create and initialise the physics manager.

Returns
Pointer to the initialised kPhysicsManager.

◆ createRenderer()

KEMENA3D_API kRenderer * kemena::createRenderer ( kWindow * window)

Create and initialise the renderer for a given window.

Allocates a kRenderer, stamps it with the engine name/version, and initialises it against the supplied window.

Parameters
windowThe window the renderer will draw into.
Returns
Pointer to the initialised kRenderer, or nullptr on failure.

◆ createScriptManager()

KEMENA3D_API kScriptManager * kemena::createScriptManager ( )

Create a new script manager.

Returns
Pointer to a newly allocated kScriptManager.

◆ createWindow()

KEMENA3D_API kWindow * kemena::createWindow ( int width,
int height,
kString title,
bool maximized = false,
kWindowType type = kWindowType::WINDOW_DEFAULT,
void * nativeHandle = nullptr )

Create and initialise a new application window.

Allocates a kWindow, initialises it with the given parameters, and returns it. Returns nullptr if initialisation fails.

Parameters
widthWindow client area width, in pixels.
heightWindow client area height, in pixels.
titleWindow title text.
maximizedWhether the window should start maximized (default: false).
typeWindow type/style to create (default: kWindowType::WINDOW_DEFAULT).
nativeHandleOptional existing native window handle to wrap, or nullptr to create a new one.
Returns
Pointer to the initialised kWindow, or nullptr on failure.

◆ createWorld()

KEMENA3D_API kWorld * kemena::createWorld ( kAssetManager * assetManager)

Create a new world (scene) bound to an asset manager.

Parameters
assetManagerThe asset manager the world will use to load resources.
Returns
Pointer to a newly allocated kWorld.

◆ decode()

void kemena::decode ( uint32_t * output,
const uint8_t * input,
size_t length )
inline

Reassembles bytes into 32-bit words assuming little-endian order.

Parameters
outputDestination array of 32-bit words (holds length / 4 words).
inputSource byte buffer.
lengthNumber of input bytes to consume (multiple of 4).

◆ encode()

void kemena::encode ( uint8_t * output,
const uint32_t * input,
size_t length )
inline

Serialises 32-bit words into bytes in little-endian order.

Parameters
outputDestination byte buffer (must hold length bytes).
inputSource array of 32-bit words.
lengthNumber of output bytes to produce (multiple of 4).
Here is the caller graph for this function:

◆ F()

uint32_t kemena::F ( uint32_t x,
uint32_t y,
uint32_t z )
inline

MD5 auxiliary function F used in round 1: (x & y) | (~x & z).

Parameters
xFirst state word.
ySecond state word.
zThird state word.
Returns
The bitwise result of the F mixing function.
Here is the caller graph for this function:

◆ FF()

void kemena::FF ( uint32_t & a,
uint32_t b,
uint32_t c,
uint32_t d,
uint32_t x,
uint32_t s,
uint32_t ac )
inline

Round-1 transformation step using the F mixing function.

Parameters
aState word updated in place.
bSecond state word.
cThird state word.
dFourth state word.
xMessage sub-block word for this step.
sLeft-rotation amount.
acPer-step additive constant.
Here is the call graph for this function:

◆ G()

uint32_t kemena::G ( uint32_t x,
uint32_t y,
uint32_t z )
inline

MD5 auxiliary function G used in round 2: (x & z) | (y & ~z).

Parameters
xFirst state word.
ySecond state word.
zThird state word.
Returns
The bitwise result of the G mixing function.
Here is the caller graph for this function:

◆ generateFileChecksum()

kString kemena::generateFileChecksum ( const kString & fileName)
inline

Computes an MD5 checksum of the given file.

Parameters
fileNamePath to the file.
Returns
Lowercase hex MD5 digest kString, or empty kString if the file cannot be opened.
Here is the call graph for this function:

◆ generateRandomString()

kString kemena::generateRandomString ( int stringLength)
inline

Generates a cryptographically random alphanumeric kString.

Parameters
stringLengthNumber of characters to generate.
Returns
Random kString of the requested length.

◆ generateUuid()

kString kemena::generateUuid ( )
inline

Generates a random UUID v4 kString.

Returns
UUID formatted as xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx.

◆ GG()

void kemena::GG ( uint32_t & a,
uint32_t b,
uint32_t c,
uint32_t d,
uint32_t x,
uint32_t s,
uint32_t ac )
inline

Round-2 transformation step using the G mixing function.

Parameters
aState word updated in place.
bSecond state word.
cThird state word.
dFourth state word.
xMessage sub-block word for this step.
sLeft-rotation amount.
acPer-step additive constant.
Here is the call graph for this function:

◆ H()

uint32_t kemena::H ( uint32_t x,
uint32_t y,
uint32_t z )
inline

MD5 auxiliary function H used in round 3: x ^ y ^ z.

Parameters
xFirst state word.
ySecond state word.
zThird state word.
Returns
The bitwise XOR of the three state words.
Here is the caller graph for this function:

◆ HH()

void kemena::HH ( uint32_t & a,
uint32_t b,
uint32_t c,
uint32_t d,
uint32_t x,
uint32_t s,
uint32_t ac )
inline

Round-3 transformation step using the H mixing function.

Parameters
aState word updated in place.
bSecond state word.
cThird state word.
dFourth state word.
xMessage sub-block word for this step.
sLeft-rotation amount.
acPer-step additive constant.
Here is the call graph for this function:

◆ I()

uint32_t kemena::I ( uint32_t x,
uint32_t y,
uint32_t z )
inline

MD5 auxiliary function I used in round 4: y ^ (x | ~z).

Parameters
xFirst state word.
ySecond state word.
zThird state word.
Returns
The bitwise result of the I mixing function.
Here is the caller graph for this function:

◆ II()

void kemena::II ( uint32_t & a,
uint32_t b,
uint32_t c,
uint32_t d,
uint32_t x,
uint32_t s,
uint32_t ac )
inline

Round-4 transformation step using the I mixing function.

Parameters
aState word updated in place.
bSecond state word.
cThird state word.
dFourth state word.
xMessage sub-block word for this step.
sLeft-rotation amount.
acPer-step additive constant.
Here is the call graph for this function:

◆ kPinCompatible()

bool kemena::kPinCompatible ( kPinType from,
kPinType to )
inline

Tests whether an output pin type may feed into an input pin type.

Allows identical types plus a set of safe implicit promotions: float to any vector, vec3 to vec4, and vec4 to vec3 (taking .rgb).

Parameters
fromSource (output) pin type.
toDestination (input) pin type.
Returns
true if a link from from to to is permitted.

◆ kPinTypeName()

const char * kemena::kPinTypeName ( kPinType t)
inline

Returns the GLSL type keyword for a pin type.

Parameters
tPin type to name.
Returns
GLSL type string (e.g. "float", "vec3", "sampler2D"); defaults to "float".

◆ kScriptEventDecl()

KEMENA3D_API const char * kemena::kScriptEventDecl ( kScriptEvent evt)

AngelScript declaration string for each kScriptEvent (indexed by enum).

◆ kScriptNodeTypeName()

KEMENA3D_API const char * kemena::kScriptNodeTypeName ( kScriptNodeType type)

Human-readable label for a node type (used by the editor menu).

Parameters
typeNode type to name.
Returns
A static, null-terminated display string (e.g. "On Update").

◆ registerScriptBindings()

KEMENA3D_API void kemena::registerScriptBindings ( kScriptManager * manager)

Registers all host types and functions on manager's engine.

Call once, right after the kScriptManager is created and before any script is compiled. Safe to call again only if the previous engine was destroyed (AngelScript rejects duplicate registrations).

Parameters
managerThe script manager whose engine receives the bindings.

◆ rotate_left()

uint32_t kemena::rotate_left ( uint32_t x,
int n )
inline

Performs a circular left rotation of a 32-bit value.

Parameters
xValue to rotate.
nNumber of bit positions to rotate left.
Returns
x rotated left by n bits.
Here is the caller graph for this function:

Variable Documentation

◆ engineName

const kString kemena::engineName = "Kemena3D"

Human-readable engine name, reported to the renderer/backend.

◆ engineVersion

const uint32_t kemena::engineVersion = 1

Engine version number, reported to the renderer/backend.