Documentation ¶
Index ¶
- type Camera
- func (c *Camera) GetID() string
- func (c *Camera) GetOffset() *vector2.Vector2
- func (c *Camera) GetResolutionHeight() int
- func (c *Camera) GetResolutionVector() *vector2.Vector2
- func (c *Camera) GetResolutionWidth() int
- func (c *Camera) GetTransform() interfaces.ITransform
- func (c *Camera) GetViewRange() float64
- func (c *Camera) SetOffset(offset *vector2.Vector2)
- func (c *Camera) SetResolution(width int, height int)
- func (c *Camera) SetResolutionHeight(height int)
- func (c *Camera) SetResolutionWidth(width int)
- func (c *Camera) SetViewRange(viewRange float64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Camera ¶
type Camera struct {
// contains filtered or unexported fields
}
A base component that implements camera features, such as view range, resolution.
func New ¶
func New(tf interfaces.ITransform, resolutionWidth, resolutionHeight int) *Camera
func (*Camera) GetOffset ¶
Get a screen offset of the camera. Offset - Is a vector thattakes into account the current camera coordinates and resolution size. Also takes into account the camera scale.
func (*Camera) GetResolutionHeight ¶
Returns a height of the screen resolution. Measured in pixels.
func (*Camera) GetResolutionVector ¶
Returns a vector with the screen resolution. Measured in pixels.
func (*Camera) GetResolutionWidth ¶
Returns a width of the screen resolution. Measured in pixels.
func (*Camera) GetTransform ¶
func (c *Camera) GetTransform() interfaces.ITransform
Returns transform of the camera. Rotation doesn't implemented and will be ignored.
func (*Camera) GetViewRange ¶
Returns layer limit (Z coordinate) at which the camera stops displaying the object.
func (*Camera) SetOffset ¶
* BE CAREFUL
Set a offset of the camera. Offset - Is a vector thattakes into account the current camera coordinates and resolution size. Also takes into account the camera scale.
func (*Camera) SetResolution ¶
Set a resolution of the screen. Measured in pixels.
func (*Camera) SetResolutionHeight ¶
Set a height of the screen resolution. Measured in pixels.
func (*Camera) SetResolutionWidth ¶
Set a width of the screen resolution. Measured in pixels.
func (*Camera) SetViewRange ¶
Set the layer limit (Z coordinate) at which the camera stops displaying the object.