GlobeCamera class

Camera and projection model for projecting 3D globe coordinates onto the 2D canvas.

Annotations

Constructors

GlobeCamera({double altitude = 2.5, Offset center = Offset.zero, double radius = 100.0, GlobeProjection projection = GlobeProjection.perspective})
Creates a globe camera with altitude, viewport center, screen radius, and projection mode.
const

Properties

altitude → double
Distance of camera from the globe center (higher = flatter/orthographic, lower = stronger perspective).
final
center → Offset
Center offset of the globe on the canvas.
final
hashCode → int
The hash code for this object.
no setterinherited
projection → GlobeProjection
Projection mode (perspective vs orthographic).
final
radius → double
Screen radius of the globe in logical pixels.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
project(Vector3D rotatedPoint) → ProjectedPoint3D
Projects a 3D point (already rotated by the globe orientation) to 2D screen coordinates.
projectCoordinates(double rx, double ry, double rz) → (double, double, double, double)
Zero-allocation record projection from raw 3D coordinates.
projectRaw(Vector3D rotatedPoint) → (double, double, double, double)
High-performance record projection without allocating ProjectedPoint3D or Offset.
projectSpherical(double latRadians, double lngRadians, Quaternion3D rotation, [double elevation = 1.0]) → ProjectedPoint3D
Projects a geographic point (lat, lng in radians) rotated by rotation quaternion onto the screen.
toString() → String
A string representation of this object.
inherited
unproject(Offset screenPoint, Quaternion3D rotation) → Vector3D?
Inverse projects a 2D screen touch point to geographic coordinates (lat, lng in degrees) on the globe. Returns null if the screen point is outside the globe disc.

Operators

operator ==(Object other) → bool
The equality operator.
inherited