MCPcopy
hub / github.com/g3n/engine / Camera

Struct Camera

camera/camera.go:42–53  ·  view source on GitHub ↗

Camera represents a virtual camera, which specifies how to project a 3D scene onto an image.

Source from the content-addressed store, hash-verified

40
41// Camera represents a virtual camera, which specifies how to project a 3D scene onto an image.
42type Camera struct {
43 core.Node // Embedded Node
44 aspect float32 // Aspect ratio (width/height)
45 near float32 // Near plane depth
46 far float32 // Far plane depth
47 axis Axis // The reference axis
48 proj Projection // Projection method
49 fov float32 // Perspective field-of-view along reference axis
50 size float32 // Orthographic size along reference axis
51 projChanged bool // Flag indicating that the projection matrix needs to be recalculated
52 projMatrix math32.Matrix4 // Last calculated projection matrix
53}
54
55// New creates and returns a new perspective camera with the specified aspect ratio and default parameters.
56func New(aspect float32) *Camera {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected