Tramway SDK
Public Member Functions | Protected Attributes | List of all members
tram::Ext::Camera::FirstPersonCamera Class Reference

#include <firstperson.h>

Inheritance diagram for tram::Ext::Camera::FirstPersonCamera:
tram::Ext::Camera::Camera

Public Member Functions

 FirstPersonCamera ()
 
 ~FirstPersonCamera ()
 
void Update ()
 
void SetTilt (float tilt)
 
void SetMouselook (bool mouselook)
 
void SetRotateFollowing (bool rotate_following)
 
void SetBobbing (float bobbing_weight)
 
void SetBobbingDistance (float bobbing_distance)
 
void SetBobbingTilt (float bobbing_tilt)
 
void SetBobbingCallback (void(*bob_callback)(FirstPersonCamera *))
 
void SetBobSpeed (float speed)
 
float GetBob ()
 
float GetWeight ()
 
void SetFollowingInterpolation (float following_interpolation)
 
void SetFollowingOffset (vec3 offset)
 
- Public Member Functions inherited from tram::Ext::Camera::Camera
void SetActive ()
 
void SetFollowing (Entity *)
 
id_t GetFollowing ()
 
void SetPosition (vec3 position)
 
void SetRotation (quat rotation)
 
vec3 GetPosition ()
 
quat GetRotation ()
 
void SetViewTransform ()
 
void SetListenerTransform ()
 
void SetFollowingLookat (quat new_lookat)
 
void SetLayerMask (uint32_t layer_mask)
 
virtual ~Camera ()
 

Protected Attributes

float tilt = 0.0f
 
float tilt_goal = 0.0f
 
float tilt_last = 0.0f
 
float bob = 0.0f
 
float bobbing_weight_goal = 0.0f
 
float bobbing_weight = 0.0f
 
float bobbing_distance = 0.2f
 
float bobbing_tilt_goal = 0.0f
 
float bobbing_tilt = 0.0f
 
float bob_speed = 0.1f
 
int callback_count = 0
 
- Protected Attributes inherited from tram::Ext::Camera::Camera
vec3 position = {0.0f, 0.0f, 0.0f}
 
quat rotation = {1.0f, 0.0f, 0.0f, 0.0f}
 
listener_t following_listener = 0
 
uint32_t layer_mask = 1 + 2
 
id_t following = 0
 
quat following_lookat = {1.0f, 0.0f, 0.0f, 0.0f}
 

Constructor & Destructor Documentation

◆ FirstPersonCamera()

tram::Ext::Camera::FirstPersonCamera::FirstPersonCamera ( )
inline

◆ ~FirstPersonCamera()

tram::Ext::Camera::FirstPersonCamera::~FirstPersonCamera ( )
inline

Member Function Documentation

◆ GetBob()

float tram::Ext::Camera::FirstPersonCamera::GetBob ( )

◆ GetWeight()

float tram::Ext::Camera::FirstPersonCamera::GetWeight ( )

◆ SetBobbing()

void tram::Ext::Camera::FirstPersonCamera::SetBobbing ( float  bobbing_weight)

◆ SetBobbingCallback()

void tram::Ext::Camera::FirstPersonCamera::SetBobbingCallback ( void(*)(FirstPersonCamera *)  bob_callback)

◆ SetBobbingDistance()

void tram::Ext::Camera::FirstPersonCamera::SetBobbingDistance ( float  bobbing_distance)

◆ SetBobbingTilt()

void tram::Ext::Camera::FirstPersonCamera::SetBobbingTilt ( float  bobbing_tilt)

◆ SetBobSpeed()

void tram::Ext::Camera::FirstPersonCamera::SetBobSpeed ( float  speed)

◆ SetFollowingInterpolation()

void tram::Ext::Camera::FirstPersonCamera::SetFollowingInterpolation ( float  following_interpolation)
inline

◆ SetFollowingOffset()

void tram::Ext::Camera::FirstPersonCamera::SetFollowingOffset ( vec3  offset)
inline

◆ SetMouselook()

void tram::Ext::Camera::FirstPersonCamera::SetMouselook ( bool  mouselook)

◆ SetRotateFollowing()

void tram::Ext::Camera::FirstPersonCamera::SetRotateFollowing ( bool  rotate_following)

◆ SetTilt()

void tram::Ext::Camera::FirstPersonCamera::SetTilt ( float  tilt)

◆ Update()

void tram::Ext::Camera::FirstPersonCamera::Update ( )
virtual

Member Data Documentation

◆ bob

float tram::Ext::Camera::FirstPersonCamera::bob = 0.0f
protected

◆ bob_speed

float tram::Ext::Camera::FirstPersonCamera::bob_speed = 0.1f
protected

◆ bobbing_distance

float tram::Ext::Camera::FirstPersonCamera::bobbing_distance = 0.2f
protected

◆ bobbing_tilt

float tram::Ext::Camera::FirstPersonCamera::bobbing_tilt = 0.0f
protected

◆ bobbing_tilt_goal

float tram::Ext::Camera::FirstPersonCamera::bobbing_tilt_goal = 0.0f
protected

◆ bobbing_weight

float tram::Ext::Camera::FirstPersonCamera::bobbing_weight = 0.0f
protected

◆ bobbing_weight_goal

float tram::Ext::Camera::FirstPersonCamera::bobbing_weight_goal = 0.0f
protected

◆ callback_count

int tram::Ext::Camera::FirstPersonCamera::callback_count = 0
protected

◆ tilt

float tram::Ext::Camera::FirstPersonCamera::tilt = 0.0f
protected

◆ tilt_goal

float tram::Ext::Camera::FirstPersonCamera::tilt_goal = 0.0f
protected

◆ tilt_last

float tram::Ext::Camera::FirstPersonCamera::tilt_last = 0.0f
protected

The documentation for this class was generated from the following files: