|
Avara3D 0.2.0
C++ API reference
|
These conventions are global API contracts shared by scene, rendering, physics, input, and mathematical types. They live here because no single Avara3D class owns them.
Avara3D uses a right-handed 3D coordinate convention:
A Node's forward(), up(), and right() functions return those local axes after applying the node's orientation. Their world-space counterparts apply the complete inherited orientation.
A Node stores position, orientation, and scale relative to its parent.
parentWorld * local.matrix * vector.The worldPosition(), worldOrientation(), worldScale(), worldForward(), worldUp(), and worldRight() accessors expose inherited results. convertTo() and convertFrom() move points or transforms between node-local coordinate spaces through world space.
Public rotation angles are expressed in radians unless an API explicitly says otherwise.
Runner and Scene lifecycle timing values are expressed in seconds:
Geometry and physics values are not tagged with compile-time units. They must use one internally consistent scale.
The default PhysicsWorld gravity is (0, -9.807, 0), so the built-in physics defaults assume a meter-like scene scale with time measured in seconds. Extremely small or extremely large world scales can reduce rigid-body stability and collision accuracy.
A PhysicsBody's rigid transform contains translation and orientation. Its local center-of-mass offset is composed when Avara3D sends a model transform to Bullet and removed when Bullet returns a dynamic-body transform to the owning Node. See the architecture overview for the synchronization diagram.
VisualWorld projection, unprojection, and mesh hit testing use logical viewport coordinates:
Framebuffer dimensions may differ from logical viewport dimensions on high-DPI displays; APIs that request logical viewport coordinates should not be given raw framebuffer pixels.