Creates an invisible pivot entity for grouping and transforming child entities.
Takes no parameters.
Returns pivot entity handle.
3D Graphics
Parameters & Returns
Parameters
This function takes no parameters.
Returns
Int
Quick Summary
Creates an invisible pivot entity for grouping and transforming child entities.
Takes no parameters.
Returns pivot entity handle.
Technical Exegesis...
Creates an invisible pivot entity for grouping and transforming child entities. Takes no parameters. Returns pivot entity handle. Increments g_nextEntityHandle. Initializes Entity3D with type ENTITY_PIVOT. Sets default position (0,0,0), rotation (0,0,0), scale (1,1,1). Sets worldMatrixDirty = true for matrix recalculation. Sets gpuTransformIndex = -1 (no GPU upload needed). Sets parent = nullptr (no parent initially). Sets visible = true, renderOrder = 0 (defaults).
Creates an invisible pivot entity for grouping and transforming child entities. Takes no parameters. Returns pivot entity handle. Increments g_nextEntityHandle. Initializes Entity3D with type ENTITY_PIVOT. Sets default position (0,0,0), rotation (0,0,0), scale (1,1,1). Sets worldMatrixDirty = true for matrix recalculation. Sets gpuTransformIndex = -1 (no GPU upload needed). Sets parent = nullptr (no parent initially). Sets visible = true, renderOrder = 0 (defaults). Sets mesh = nullptr (pivots have no visual mesh). Stores in g_entities map. Returns handle, never fails. Pivots are organizational nodes in scene hierarchy - they don't render but affect child transforms. Use b3dSetParent to attach entities to pivot. Moving/rotating pivot moves/rotates all children relative to pivot's transform. Essential for articulated models (robot arm: shoulder pivot -> upper arm -> elbow pivot -> forearm), complex animations, grouped movement.
This function creates transform-only entity for hierarchy management. Pivot transforms multiply down hierarchy: childWorldMatrix = parentWorldMatrix * childLocalMatrix. Common use cases: (1) Character rig - pelvis pivot with leg/spine children, (2) Vehicle turret - chassis pivot with turret child, (3) Solar system - sun pivot with planet children, planet pivots with moon children, (4) Door hinge - door frame pivot with door child rotates around pivot point, (5) Camera rig - boom pivot for orbital camera. Pivots support full transform operations: b3dSetPosition, b3dSetRotation, b3dSetScale, b3dMoveEntity, b3dTurnEntity. Pivots can parent other pivots for multi-level hierarchies. World matrix calculated recursively during rendering. Visible flag inherited by children unless overridden. Collision/physics can attach to pivots. Pivots have no performance cost (zero vertices/triangles). Use liberally for organization. Alternative: parent entities directly to mesh entities, but pivots clearer for pure transform nodes.