#include <camera.h>
◆ Camera()
References g_settings, RenderingEngine::get_scene_manager(), Settings::getBool(), Settings::getFloat(), m_arm_inertia, m_cache_fall_bobbing_amount, m_cache_fov, m_cache_view_bobbing_amount, m_cameranode, m_client, m_headnode, m_nametags, m_playernode, m_show_nametag_backgrounds, m_wieldmgr, m_wieldnode, and WieldMeshSceneNode::setItem().
◆ ~Camera()
◆ addArmInertia()
void Camera::addArmInertia |
( |
f32 | player_yaw | ) |
|
|
inline |
References dir(), m_arm_dir, m_cam_vel, m_cam_vel_old, m_camera_direction, m_last_cam_pos, m_wieldmesh_offset, rangelim, WIELDMESH_AMPLITUDE_X, WIELDMESH_AMPLITUDE_Y, WIELDMESH_OFFSET_X, and WIELDMESH_OFFSET_Y.
Referenced by update().
◆ addNametag()
Nametag * Camera::addNametag |
( |
scene::ISceneNode * | parent_node, |
|
|
const std::string & | text, |
|
|
video::SColor | textcolor, |
|
|
std::optional< video::SColor > | bgcolor, |
|
|
const v3f & | pos ) |
◆ drawNametags()
void Camera::drawNametags |
( |
| ) |
|
◆ drawWieldedTool()
void Camera::drawWieldedTool |
( |
irr::core::matrix4 * | translation = NULL | ) |
|
◆ getCameraMode()
References m_camera_mode.
Referenced by Game::drawScene(), Client::interact(), Game::isTouchCrosshairDisabled(), LuaCamera::l_get_camera_mode(), LuaCamera::l_set_camera_mode(), Game::processPlayerInteraction(), MapPostFxStep::run(), Client::sendPlayerPos(), GenericCAO::setAttachment(), Game::updateCamera(), Game::updateCameraOrientation(), Game::updateFrame(), and GenericCAO::updateMeshCulling().
◆ getCameraNode()
scene::ICameraSceneNode * Camera::getCameraNode |
( |
| ) |
const |
|
inline |
◆ getDirection()
v3f Camera::getDirection |
( |
| ) |
const |
|
inline |
◆ getFovMax()
f32 Camera::getFovMax |
( |
| ) |
const |
|
inline |
◆ getFovX()
f32 Camera::getFovX |
( |
| ) |
const |
|
inline |
◆ getFovY()
f32 Camera::getFovY |
( |
| ) |
const |
|
inline |
◆ getFrustumCuller()
auto Camera::getFrustumCuller |
( |
| ) |
const |
|
inline |
◆ getFrustumCullPlanes()
std::array< core::plane3d< f32 >, 4 > Camera::getFrustumCullPlanes |
( |
| ) |
const |
|
private |
◆ getHeadPosition()
v3f Camera::getHeadPosition |
( |
| ) |
const |
|
inline |
◆ getOffset()
v3s16 Camera::getOffset |
( |
| ) |
const |
|
inline |
◆ getPosition()
v3f Camera::getPosition |
( |
| ) |
const |
|
inline |
◆ notifyFovChange()
void Camera::notifyFovChange |
( |
| ) |
|
References PlayerFovSpec::fov, Client::getEnv(), Player::getFov(), ClientEnvironment::getLocalPlayer(), PlayerFovSpec::is_multiplier, m_cache_fov, m_client, m_curr_fov_degrees, m_fov_diff, m_fov_transition_active, m_server_sent_fov, m_target_fov_degrees, m_transition_time, and PlayerFovSpec::transition_time.
Referenced by Client::handleCommand_Fov().
◆ removeNametag()
void Camera::removeNametag |
( |
Nametag * | nametag | ) |
|
◆ setCameraMode()
◆ setDigging()
void Camera::setDigging |
( |
s32 | button | ) |
|
◆ step()
void Camera::step |
( |
f32 | dtime | ) |
|
References MtEvent::CAMERA_PUNCH_LEFT, MtEvent::CAMERA_PUNCH_RIGHT, Client::getEventManager(), m_client, m_digging_anim, m_digging_button, m_player_light_color, m_view_bobbing_anim, m_view_bobbing_fall, m_view_bobbing_speed, m_view_bobbing_state, m_wield_change_timer, m_wield_item_next, m_wieldnode, my_modf(), MYMIN, MtEventManager::put(), WieldMeshSceneNode::setItem(), WieldMeshSceneNode::setNodeLightColor(), step(), and MtEvent::VIEW_BOBBING_STEP.
Referenced by step(), and Game::updateCamera().
◆ toggleCameraMode()
void Camera::toggleCameraMode |
( |
| ) |
|
|
inline |
◆ update()
void Camera::update |
( |
LocalPlayer * | player, |
|
|
f32 | frametime, |
|
|
f32 | tool_reload_ratio ) |
References addArmInertia(), BS, LocalPlayer::camera_impact, CAMERA_MODE_FIRST, CAMERA_MODE_THIRD, CAMERA_MODE_THIRD_FRONT, CAMERA_OFFSET_STEP, Client::checkLocalPrivilege(), easeCurve(), Player::eye_offset_first, Player::eye_offset_third, Player::eye_offset_third_front, floatToInt(), g_settings, NodeDefManager::get(), Settings::getBool(), LocalPlayer::getCAO(), ClientEnvironment::getClientMap(), Client::getEnv(), LocalPlayer::getEyeOffset(), Map::getNode(), LocalPlayer::getParent(), LocalPlayer::getPitch(), Player::getPlayerControl(), ClientActiveObject::getPosition(), LocalPlayer::getPosition(), Player::getSpeed(), GenericCAO::getStepHeight(), RenderingEngine::getWindowSize(), LocalPlayer::getYaw(), LocalPlayer::getZoomFOV(), LocalPlayer::hurt_tilt_strength, LocalPlayer::hurt_tilt_timer, LocalPlayer::in_liquid, intToFloat(), LocalPlayer::is_climbing, LocalPlayer::light_color, m_arm_inertia, m_aspect, m_cache_fall_bobbing_amount, m_cache_fov, m_cache_view_bobbing_amount, m_camera_direction, m_camera_mode, m_camera_offset, m_camera_position, m_cameranode, m_client, m_curr_fov_degrees, m_digging_anim, m_digging_button, m_fov_diff, m_fov_transition_active, m_fov_x, m_fov_y, m_headnode, m_player_light_color, m_playernode, m_server_sent_fov, m_stepheight_smooth_active, m_target_fov_degrees, m_transition_time, m_view_bobbing_anim, m_view_bobbing_fall, m_view_bobbing_speed, m_view_bobbing_state, m_wield_change_timer, m_wieldmesh_offset, m_wieldnode, my_modf(), MYMIN, IGameDef::ndef(), rangelim, WieldMeshSceneNode::setNodeLightColor(), LocalPlayer::swimming_vertical, LocalPlayer::touching_ground, updateViewingRange(), ContentFeatures::walkable, and PlayerControl::zoom.
Referenced by Game::updateCamera().
◆ updateViewingRange()
void Camera::updateViewingRange |
( |
| ) |
|
◆ wield()
◆ m_arm_dir
◆ m_arm_inertia
bool Camera::m_arm_inertia |
|
private |
◆ m_aspect
f32 Camera::m_aspect = 1.0f |
|
private |
◆ m_cache_fall_bobbing_amount
f32 Camera::m_cache_fall_bobbing_amount |
|
private |
◆ m_cache_fov
◆ m_cache_view_bobbing_amount
f32 Camera::m_cache_view_bobbing_amount |
|
private |
◆ m_cam_vel
◆ m_cam_vel_old
v2f Camera::m_cam_vel_old |
|
private |
◆ m_camera_direction
v3f Camera::m_camera_direction |
|
private |
◆ m_camera_mode
◆ m_camera_offset
v3s16 Camera::m_camera_offset |
|
private |
◆ m_camera_position
v3f Camera::m_camera_position |
|
private |
◆ m_cameranode
scene::ICameraSceneNode* Camera::m_cameranode = nullptr |
|
private |
◆ m_client
◆ m_curr_fov_degrees
f32 Camera::m_curr_fov_degrees |
|
private |
◆ m_digging_anim
f32 Camera::m_digging_anim = 0.0f |
|
private |
◆ m_digging_button
s32 Camera::m_digging_button = -1 |
|
private |
◆ m_draw_control
◆ m_fov_diff
◆ m_fov_transition_active
bool Camera::m_fov_transition_active = false |
|
private |
◆ m_fov_x
f32 Camera::m_fov_x = 1.0f |
|
private |
◆ m_fov_y
f32 Camera::m_fov_y = 1.0f |
|
private |
◆ m_headnode
scene::ISceneNode* Camera::m_headnode = nullptr |
|
private |
◆ m_last_cam_pos
v2f Camera::m_last_cam_pos |
|
private |
◆ m_nametags
std::list<Nametag *> Camera::m_nametags |
|
private |
◆ m_player_light_color
video::SColor Camera::m_player_light_color |
|
private |
◆ m_playernode
scene::ISceneNode* Camera::m_playernode = nullptr |
|
private |
◆ m_server_sent_fov
bool Camera::m_server_sent_fov = false |
|
private |
◆ m_show_nametag_backgrounds
bool Camera::m_show_nametag_backgrounds |
|
private |
◆ m_stepheight_smooth_active
bool Camera::m_stepheight_smooth_active = false |
|
private |
◆ m_target_fov_degrees
f32 Camera::m_target_fov_degrees |
|
private |
◆ m_transition_time
f32 Camera::m_transition_time |
|
private |
◆ m_view_bobbing_anim
f32 Camera::m_view_bobbing_anim = 0.0f |
|
private |
◆ m_view_bobbing_fall
f32 Camera::m_view_bobbing_fall = 0.0f |
|
private |
◆ m_view_bobbing_speed
f32 Camera::m_view_bobbing_speed = 0.0f |
|
private |
◆ m_view_bobbing_state
s32 Camera::m_view_bobbing_state = 0 |
|
private |
◆ m_wield_change_timer
f32 Camera::m_wield_change_timer = 0.125f |
|
private |
◆ m_wield_item_next
◆ m_wieldmesh_offset
v2f Camera::m_wieldmesh_offset = v2f(55.0f, -35.0f) |
|
private |
◆ m_wieldmgr
scene::ISceneManager* Camera::m_wieldmgr = nullptr |
|
private |
◆ m_wieldnode
The documentation for this class was generated from the following files: