rj-action-library-cpp/RJVirtualCamera3DManager.cpp

49 lines
2.4 KiB
C++
Raw Normal View History

2024-05-19 15:48:01 +00:00
/* RJVirtualCamera3DManager.cpp */
#include "RJVirtualCamera3DManager.h"
2024-08-02 06:21:30 +00:00
// Registers fields, signals and methods for Godot
2024-05-19 15:48:01 +00:00
void RJVirtualCamera3DManager::_bind_methods()
{
GDVIRTUAL_BIND( getCamera, "cameraIndex" );
GDVIRTUAL_BIND( getCameraIndex, "timeLine" );
GDVIRTUAL_BIND( getCameraSize );
GDVIRTUAL_BIND( getCameraPriority, "cameraIndex" );
GDVIRTUAL_BIND( setCameraPriority, "cameraIndex", "priority" );
2024-08-02 06:21:30 +00:00
// cameraPrioritySmoothingCoefficient: float
ClassDB::bind_method( D_METHOD( "set_cameraPrioritySmoothingCoefficient", "cameraPrioritySmoothingCoefficient" ), &RJVirtualCamera3DManager::set_cameraPrioritySmoothingCoefficient );
ClassDB::bind_method( D_METHOD( "get_cameraPrioritySmoothingCoefficient"), &RJVirtualCamera3DManager::get_cameraPrioritySmoothingCoefficient);
ADD_PROPERTY(PropertyInfo( Variant::FLOAT, "cameraPrioritySmoothingCoefficient" ), "set_cameraPrioritySmoothingCoefficient", "get_cameraPrioritySmoothingCoefficient" );
2024-05-19 15:48:01 +00:00
2024-08-02 06:21:30 +00:00
// cameraPrioritySmoothingStepFPS: float
ClassDB::bind_method( D_METHOD( "set_cameraPrioritySmoothingStepFPS", "cameraPrioritySmoothingStepFPS" ), &RJVirtualCamera3DManager::set_cameraPrioritySmoothingStepFPS );
ClassDB::bind_method( D_METHOD( "get_cameraPrioritySmoothingStepFPS"), &RJVirtualCamera3DManager::get_cameraPrioritySmoothingStepFPS);
ADD_PROPERTY(PropertyInfo( Variant::FLOAT, "cameraPrioritySmoothingStepFPS" ), "set_cameraPrioritySmoothingStepFPS", "get_cameraPrioritySmoothingStepFPS" );
2024-05-19 15:48:01 +00:00
}
2024-08-02 06:21:30 +00:00
// Constructor
2024-05-19 15:48:01 +00:00
RJVirtualCamera3DManager::RJVirtualCamera3DManager()
{
cameraPrioritySmoothingCoefficient = 0.5;
cameraPrioritySmoothingStepFPS = 120;
}
2024-08-02 06:21:30 +00:00
// Destructor
2024-05-19 15:48:01 +00:00
RJVirtualCamera3DManager::~RJVirtualCamera3DManager()
{
}
2024-08-02 06:21:30 +00:00
// cameraPrioritySmoothingCoefficient: float
2024-05-19 15:48:01 +00:00
float RJVirtualCamera3DManager::get_cameraPrioritySmoothingCoefficient() { return cameraPrioritySmoothingCoefficient; }
void RJVirtualCamera3DManager::set_cameraPrioritySmoothingCoefficient( float p_cameraPrioritySmoothingCoefficient ) { cameraPrioritySmoothingCoefficient = p_cameraPrioritySmoothingCoefficient; }
2024-08-02 06:21:30 +00:00
// cameraPrioritySmoothingStepFPS: float
2024-05-19 15:48:01 +00:00
float RJVirtualCamera3DManager::get_cameraPrioritySmoothingStepFPS() { return cameraPrioritySmoothingStepFPS; }
void RJVirtualCamera3DManager::set_cameraPrioritySmoothingStepFPS( float p_cameraPrioritySmoothingStepFPS ) { cameraPrioritySmoothingStepFPS = p_cameraPrioritySmoothingStepFPS; }
2024-08-02 06:21:30 +00:00