rj-action-library-cpp/RJVirtualCamera3DManager.cpp

49 lines
2.4 KiB
C++

/* RJVirtualCamera3DManager.cpp */
#include "RJVirtualCamera3DManager.h"
// Registers fields, signals and methods for Godot
void RJVirtualCamera3DManager::_bind_methods()
{
GDVIRTUAL_BIND( getCamera, "cameraIndex" );
GDVIRTUAL_BIND( getCameraIndex, "timeLine" );
GDVIRTUAL_BIND( getCameraSize );
GDVIRTUAL_BIND( getCameraPriority, "cameraIndex" );
GDVIRTUAL_BIND( setCameraPriority, "cameraIndex", "priority" );
// 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" );
// 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" );
}
// Constructor
RJVirtualCamera3DManager::RJVirtualCamera3DManager()
{
cameraPrioritySmoothingCoefficient = 0.5;
cameraPrioritySmoothingStepFPS = 120;
}
// Destructor
RJVirtualCamera3DManager::~RJVirtualCamera3DManager()
{
}
// cameraPrioritySmoothingCoefficient: float
float RJVirtualCamera3DManager::get_cameraPrioritySmoothingCoefficient() { return cameraPrioritySmoothingCoefficient; }
void RJVirtualCamera3DManager::set_cameraPrioritySmoothingCoefficient( float p_cameraPrioritySmoothingCoefficient ) { cameraPrioritySmoothingCoefficient = p_cameraPrioritySmoothingCoefficient; }
// cameraPrioritySmoothingStepFPS: float
float RJVirtualCamera3DManager::get_cameraPrioritySmoothingStepFPS() { return cameraPrioritySmoothingStepFPS; }
void RJVirtualCamera3DManager::set_cameraPrioritySmoothingStepFPS( float p_cameraPrioritySmoothingStepFPS ) { cameraPrioritySmoothingStepFPS = p_cameraPrioritySmoothingStepFPS; }