From 29c6666c18a64e93fb302ee49538b8881d54d30f Mon Sep 17 00:00:00 2001 From: Josef Date: Fri, 2 Aug 2024 08:21:30 +0200 Subject: [PATCH] Caster/Pointer/Pointable --- RJBoolProperty.cpp | 25 ------------ RJBoolProperty.h | 33 ---------------- RJCaster.cpp | 65 ++++++++++++++++++++++++++++++ RJCaster.h | 76 ++++++++++++++++++++++++++++++++++++ RJGodotHeaders.h | 21 ++++++++++ RJIntProperty.cpp | 71 +++++++++++++++++++++++++++++++++ RJIntProperty.h | 53 +++++++++++++++++++++++++ RJNetworkNode.cpp | 10 ++++- RJNetworkNode.h | 14 +++++-- RJNodeProperty.cpp | 25 ------------ RJNodeProperty.h | 33 ---------------- RJNumberProperty.cpp | 27 ------------- RJNumberProperty.h | 35 ----------------- RJPointable.cpp | 72 ++++++++++++++++++++++++++++++++++ RJPointable.h | 75 +++++++++++++++++++++++++++++++++++ RJPointer.cpp | 34 ++++++++++++++++ RJPointer.h | 45 +++++++++++++++++++++ RJSelector.cpp | 13 ++++-- RJSelector.h | 23 ++++++++--- RJSensor.cpp | 14 +++++-- RJSensor.h | 22 ++++++++++- RJSequenceAction.cpp | 2 +- RJStringProperty.cpp | 25 ------------ RJStringProperty.h | 33 ---------------- RJTimeLine.cpp | 55 ++++++++++++++------------ RJTimeLine.h | 30 ++++++++++++-- RJTimeLineManager.cpp | 5 ++- RJTimeLineManager.h | 39 ++++++++++++++++-- RJUpdatable.cpp | 5 ++- RJUpdatable.h | 12 ++++-- RJVirtualCamera3D.cpp | 5 ++- RJVirtualCamera3D.h | 16 ++++++-- RJVirtualCamera3DManager.cpp | 25 ++++++------ RJVirtualCamera3DManager.h | 27 ++++++++++++- register_types.cpp | 24 ++++++------ 35 files changed, 766 insertions(+), 323 deletions(-) delete mode 100644 RJBoolProperty.cpp delete mode 100644 RJBoolProperty.h create mode 100644 RJCaster.cpp create mode 100644 RJCaster.h create mode 100644 RJGodotHeaders.h create mode 100644 RJIntProperty.cpp create mode 100644 RJIntProperty.h delete mode 100644 RJNodeProperty.cpp delete mode 100644 RJNodeProperty.h delete mode 100644 RJNumberProperty.cpp delete mode 100644 RJNumberProperty.h create mode 100644 RJPointable.cpp create mode 100644 RJPointable.h create mode 100644 RJPointer.cpp create mode 100644 RJPointer.h delete mode 100644 RJStringProperty.cpp delete mode 100644 RJStringProperty.h diff --git a/RJBoolProperty.cpp b/RJBoolProperty.cpp deleted file mode 100644 index f6c318c..0000000 --- a/RJBoolProperty.cpp +++ /dev/null @@ -1,25 +0,0 @@ - -/* RJBoolProperty.cpp */ - -#include "RJBoolProperty.h" - - -void RJBoolProperty::_bind_methods() -{ - GDVIRTUAL_BIND( set, "value" ); - GDVIRTUAL_BIND( get ); - ADD_SIGNAL (MethodInfo( "onChange" ) ); -} - -RJBoolProperty::RJBoolProperty() -{ - -} - -RJBoolProperty::~RJBoolProperty() -{ - -} - - - diff --git a/RJBoolProperty.h b/RJBoolProperty.h deleted file mode 100644 index ccbfc6d..0000000 --- a/RJBoolProperty.h +++ /dev/null @@ -1,33 +0,0 @@ - -/* RJBoolProperty.h */ - -#ifndef ROKOJORI__BOOL_PROPERTY_H -#define ROKOJORI__BOOL_PROPERTY_H - - -#include "./RJNetworkNode.h" - - -class RJBoolProperty : public RJNetworkNode -{ - GDCLASS(RJBoolProperty, RJNetworkNode); - -protected: - static void _bind_methods(); - - - - -public: - - GDVIRTUAL1( set, bool ); - GDVIRTUAL0R( bool, get ); - /* signal onChange */ - - RJBoolProperty(); - - ~RJBoolProperty(); -}; - - -#endif // ROKOJORI__BOOL_PROPERTY_H diff --git a/RJCaster.cpp b/RJCaster.cpp new file mode 100644 index 0000000..3dd55a9 --- /dev/null +++ b/RJCaster.cpp @@ -0,0 +1,65 @@ + +/* RJCaster.cpp */ + +#include "RJCaster.h" + +// Registers fields, signals and methods for Godot +void RJCaster::_bind_methods() +{ + // beforeProcess: RJAction* + ClassDB::bind_method( D_METHOD( "set_beforeProcess", "beforeProcess" ), &RJCaster::set_beforeProcess ); + ClassDB::bind_method( D_METHOD( "get_beforeProcess"), &RJCaster::get_beforeProcess); + ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "beforeProcess", PROPERTY_HINT_NODE_TYPE ), "set_beforeProcess", "get_beforeProcess" ); + + // afterProcess: RJAction* + ClassDB::bind_method( D_METHOD( "set_afterProcess", "afterProcess" ), &RJCaster::set_afterProcess ); + ClassDB::bind_method( D_METHOD( "get_afterProcess"), &RJCaster::get_afterProcess); + ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "afterProcess", PROPERTY_HINT_NODE_TYPE ), "set_afterProcess", "get_afterProcess" ); + + // includeSelector: Ref + ClassDB::bind_method( D_METHOD( "set_includeSelector", "includeSelector" ), &RJCaster::set_includeSelector ); + ClassDB::bind_method( D_METHOD( "get_includeSelector"), &RJCaster::get_includeSelector); + ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "includeSelector", PROPERTY_HINT_RESOURCE_TYPE ), "set_includeSelector", "get_includeSelector" ); + + // excludeSelector: Ref + ClassDB::bind_method( D_METHOD( "set_excludeSelector", "excludeSelector" ), &RJCaster::set_excludeSelector ); + ClassDB::bind_method( D_METHOD( "get_excludeSelector"), &RJCaster::get_excludeSelector); + ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "excludeSelector", PROPERTY_HINT_RESOURCE_TYPE ), "set_excludeSelector", "get_excludeSelector" ); + + GDVIRTUAL_BIND( numColliders ); + GDVIRTUAL_BIND( getCollider, "index" ); + GDVIRTUAL_BIND( getCollisionPosition, "index" ); + GDVIRTUAL_BIND( getCollisionNormal, "index" ); + GDVIRTUAL_BIND( getCollisionShape, "index" ); +} + +// Constructor +RJCaster::RJCaster() +{ + +} + +// Destructor +RJCaster::~RJCaster() +{ + +} + +// beforeProcess: RJAction* +RJAction* RJCaster::get_beforeProcess() const { return beforeProcess; } +void RJCaster::set_beforeProcess( RJAction* p_beforeProcess ) { beforeProcess = p_beforeProcess; } + +// afterProcess: RJAction* +RJAction* RJCaster::get_afterProcess() const { return afterProcess; } +void RJCaster::set_afterProcess( RJAction* p_afterProcess ) { afterProcess = p_afterProcess; } + +// includeSelector: Ref +Ref RJCaster::get_includeSelector() const { return includeSelector; } +void RJCaster::set_includeSelector( const Ref &p_includeSelector ) { includeSelector = p_includeSelector; } + +// excludeSelector: Ref +Ref RJCaster::get_excludeSelector() const { return excludeSelector; } +void RJCaster::set_excludeSelector( const Ref &p_excludeSelector ) { excludeSelector = p_excludeSelector; } + + + diff --git a/RJCaster.h b/RJCaster.h new file mode 100644 index 0000000..465ff39 --- /dev/null +++ b/RJCaster.h @@ -0,0 +1,76 @@ + +/* RJCaster.h */ + +#ifndef ROKOJORI__CASTER_H +#define ROKOJORI__CASTER_H + +#include "./RJGodotHeaders.h" +#include "./RJAction.h" +#include "./RJSelector.h" +#include "core/math/vector3.h" +#include "scene/resources/3d/shape_3d.h" +#include "scene/3d/node_3d.h" + + + + +class RJCaster : public Node3D +{ + GDCLASS( RJCaster, Node3D ); + +protected: + static void _bind_methods(); + + + + // beforeProcess : RJAction* + RJAction* beforeProcess = nullptr; + + // afterProcess : RJAction* + RJAction* afterProcess = nullptr; + + // includeSelector : Ref + Ref includeSelector; + + // excludeSelector : Ref + Ref excludeSelector; + +public: + + + // beforeProcess : RJAction* + RJAction* get_beforeProcess() const; void set_beforeProcess( RJAction* p_beforeProcess ); + + // afterProcess : RJAction* + RJAction* get_afterProcess() const; void set_afterProcess( RJAction* p_afterProcess ); + + // includeSelector : Ref + Ref get_includeSelector() const; void set_includeSelector( const Ref &p_includeSelector ); + + // excludeSelector : Ref + Ref get_excludeSelector() const; void set_excludeSelector( const Ref &p_excludeSelector ); + + // numColliders() : int + GDVIRTUAL0R( int, numColliders ); + + // getCollider( int index ) : Ref + GDVIRTUAL1R( Ref, getCollider, int ); + + // getCollisionPosition( int index ) : Vector3 + GDVIRTUAL1R( Vector3, getCollisionPosition, int ); + + // getCollisionNormal( int index ) : Vector3 + GDVIRTUAL1R( Vector3, getCollisionNormal, int ); + + // getCollisionShape( int index ) : Ref + GDVIRTUAL1R( Ref, getCollisionShape, int ); + + // Constructor + RJCaster(); + + // Destructor + ~RJCaster(); +}; + + +#endif // ROKOJORI__CASTER_H diff --git a/RJGodotHeaders.h b/RJGodotHeaders.h new file mode 100644 index 0000000..07b288c --- /dev/null +++ b/RJGodotHeaders.h @@ -0,0 +1,21 @@ +/* RJGodotHeaders.h */ + +#ifndef ROKOJORI_GODOT_HEADERS_H +#define ROKOJORI_GODOT_HEADERS_H + +#include "scene/main/node.h" +#include "scene/2d/node_2d.h" +#include "scene/3d/node_3d.h" + +#include "core/io/resource.h" + +#include "core/math/vector3.h" +#include "core/math/vector3.h" +#include "core/math/quaternion.h" +#include "core/math/color.h" + +#include "./RJNetworkNode.h" +#include "./RJAction.h" +#include "./RJSequenceAction.h" + +#endif // ROKOJORI_GODOT_HEADERS_H \ No newline at end of file diff --git a/RJIntProperty.cpp b/RJIntProperty.cpp new file mode 100644 index 0000000..1604c72 --- /dev/null +++ b/RJIntProperty.cpp @@ -0,0 +1,71 @@ + +/* RJIntProperty.cpp */ + +#include "RJIntProperty.h" + +// Registers fields, signals and methods for Godot +void RJIntProperty::_bind_methods() +{ + // value: int + ClassDB::bind_method( D_METHOD( "set_value", "value" ), &RJIntProperty::set_value ); + ClassDB::bind_method( D_METHOD( "get_value"), &RJIntProperty::get_value); + ADD_PROPERTY(PropertyInfo( Variant::INT, "value" ), "set_value", "get_value" ); + + ADD_SIGNAL (MethodInfo( "valueChanged" ) ); + // onValueChanged: RJAction* + ClassDB::bind_method( D_METHOD( "set_onValueChanged", "onValueChanged" ), &RJIntProperty::set_onValueChanged ); + ClassDB::bind_method( D_METHOD( "get_onValueChanged"), &RJIntProperty::get_onValueChanged); + ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "onValueChanged", PROPERTY_HINT_NODE_TYPE ), "set_onValueChanged", "get_onValueChanged" ); + + ClassDB::bind_method( D_METHOD( "dispatchValueChanged" ) , &RJIntProperty::dispatchValueChanged ); + ClassDB::bind_method( D_METHOD( "setValueSilent" ) , &RJIntProperty::setValueSilent ); +} + +// Constructor +RJIntProperty::RJIntProperty() +{ + +} + +// Destructor +RJIntProperty::~RJIntProperty() +{ + +} + +// value: int +int RJIntProperty::get_value() { return value; } +void RJIntProperty::set_value( int p_value ) +{ + value = p_value; + + emit_signal( SNAME( "valueChanged" ) ); + + if ( onValueChanged != NULL ) + { + onValueChanged->trigger(); + } +} + +// onValueChanged: RJAction* +RJAction* RJIntProperty::get_onValueChanged() const { return onValueChanged; } +void RJIntProperty::set_onValueChanged( RJAction* p_onValueChanged ) { onValueChanged = p_onValueChanged; } + +// dispatchValueChanged() : void +void RJIntProperty::dispatchValueChanged() +{ + emit_signal( SNAME( "valueChanged" ) ); + + if ( onValueChanged != NULL ) + { + onValueChanged->trigger(); + } +} + +// setValueSilent( int p_value ) : void +void RJIntProperty::setValueSilent( int p_value ) +{ + value = p_value; +} + + diff --git a/RJIntProperty.h b/RJIntProperty.h new file mode 100644 index 0000000..832f798 --- /dev/null +++ b/RJIntProperty.h @@ -0,0 +1,53 @@ + +/* RJIntProperty.h */ + +#ifndef ROKOJORI__INT_PROPERTY_H +#define ROKOJORI__INT_PROPERTY_H + +#include "./RJGodotHeaders.h" +#include "scene/main/node.h" + + + + +class RJIntProperty : public Node +{ + GDCLASS( RJIntProperty, Node ); + +protected: + static void _bind_methods(); + + + + // value : int + int value; + + // onValueChanged : RJAction* + RJAction* onValueChanged = nullptr; + +public: + + + // value : int + int get_value(); void set_value( int p_value ); + + // [signal] valueChanged() : void + + // onValueChanged : RJAction* + RJAction* get_onValueChanged() const; void set_onValueChanged( RJAction* p_onValueChanged ); + + // dispatchValueChanged() : void + void dispatchValueChanged(); + + // setValueSilent( int p_value ) : void + void setValueSilent( int p_value ); + + // Constructor + RJIntProperty(); + + // Destructor + ~RJIntProperty(); +}; + + +#endif // ROKOJORI__INT_PROPERTY_H diff --git a/RJNetworkNode.cpp b/RJNetworkNode.cpp index 1bcfe96..b4ee4dc 100644 --- a/RJNetworkNode.cpp +++ b/RJNetworkNode.cpp @@ -1,18 +1,26 @@ + /* RJNetworkNode.cpp */ #include "RJNetworkNode.h" +// Registers fields, signals and methods for Godot void RJNetworkNode::_bind_methods() { } +// Constructor RJNetworkNode::RJNetworkNode() { - + } +// Destructor RJNetworkNode::~RJNetworkNode() { } + + + + diff --git a/RJNetworkNode.h b/RJNetworkNode.h index 84bc3fa..48881de 100644 --- a/RJNetworkNode.h +++ b/RJNetworkNode.h @@ -1,3 +1,4 @@ + /* RJNetworkNode.h */ #ifndef ROKOJORI__NETWORK_NODE_H @@ -5,19 +6,26 @@ #include "scene/main/node.h" - class RJNetworkNode : public Node { - GDCLASS(RJNetworkNode, Node); + GDCLASS( RJNetworkNode, Node ); protected: static void _bind_methods(); + + + public: + + + // Constructor RJNetworkNode(); + + // Destructor ~RJNetworkNode(); }; -#endif // ROKOJORI__NETWORK_NODE_H \ No newline at end of file +#endif // ROKOJORI__NETWORK_NODE_H diff --git a/RJNodeProperty.cpp b/RJNodeProperty.cpp deleted file mode 100644 index 6e1eb4a..0000000 --- a/RJNodeProperty.cpp +++ /dev/null @@ -1,25 +0,0 @@ - -/* RJNodeProperty.cpp */ - -#include "RJNodeProperty.h" - - -void RJNodeProperty::_bind_methods() -{ - GDVIRTUAL_BIND( set, "value" ); - GDVIRTUAL_BIND( get ); - ADD_SIGNAL (MethodInfo( "onChange" ) ); -} - -RJNodeProperty::RJNodeProperty() -{ - -} - -RJNodeProperty::~RJNodeProperty() -{ - -} - - - diff --git a/RJNodeProperty.h b/RJNodeProperty.h deleted file mode 100644 index 7bdb98b..0000000 --- a/RJNodeProperty.h +++ /dev/null @@ -1,33 +0,0 @@ - -/* RJNodeProperty.h */ - -#ifndef ROKOJORI__NODE_PROPERTY_H -#define ROKOJORI__NODE_PROPERTY_H - - -#include "./RJNetworkNode.h" - - -class RJNodeProperty : public RJNetworkNode -{ - GDCLASS(RJNodeProperty, RJNetworkNode); - -protected: - static void _bind_methods(); - - - - -public: - - GDVIRTUAL1( set, Ref ); - GDVIRTUAL0R( Ref, get ); - /* signal onChange */ - - RJNodeProperty(); - - ~RJNodeProperty(); -}; - - -#endif // ROKOJORI__NODE_PROPERTY_H diff --git a/RJNumberProperty.cpp b/RJNumberProperty.cpp deleted file mode 100644 index 03e12c9..0000000 --- a/RJNumberProperty.cpp +++ /dev/null @@ -1,27 +0,0 @@ - -/* RJNumberProperty.cpp */ - -#include "RJNumberProperty.h" - - -void RJNumberProperty::_bind_methods() -{ - GDVIRTUAL_BIND( set, "value" ); - GDVIRTUAL_BIND( get ); - ADD_SIGNAL (MethodInfo( "changed" ) ); - GDVIRTUAL_BIND( get_onChanged ); - GDVIRTUAL_BIND( set_onChanged, "action" ); -} - -RJNumberProperty::RJNumberProperty() -{ - -} - -RJNumberProperty::~RJNumberProperty() -{ - -} - - - diff --git a/RJNumberProperty.h b/RJNumberProperty.h deleted file mode 100644 index 2b71946..0000000 --- a/RJNumberProperty.h +++ /dev/null @@ -1,35 +0,0 @@ - -/* RJNumberProperty.h */ - -#ifndef ROKOJORI__NUMBER_PROPERTY_H -#define ROKOJORI__NUMBER_PROPERTY_H - -#include "./RJAction.h" -#include "./RJNetworkNode.h" - - -class RJNumberProperty : public RJNetworkNode -{ - GDCLASS(RJNumberProperty, RJNetworkNode); - -protected: - static void _bind_methods(); - - - - -public: - - GDVIRTUAL1( set, double ); - GDVIRTUAL0R( double, get ); - /* signal changed */ - GDVIRTUAL0R( Ref, get_onChanged ); - GDVIRTUAL1( set_onChanged, Ref ); - - RJNumberProperty(); - - ~RJNumberProperty(); -}; - - -#endif // ROKOJORI__NUMBER_PROPERTY_H diff --git a/RJPointable.cpp b/RJPointable.cpp new file mode 100644 index 0000000..9193f19 --- /dev/null +++ b/RJPointable.cpp @@ -0,0 +1,72 @@ + +/* RJPointable.cpp */ + +#include "RJPointable.h" + +// Registers fields, signals and methods for Godot +void RJPointable::_bind_methods() +{ + // pointingPriority: int + ClassDB::bind_method( D_METHOD( "set_pointingPriority", "pointingPriority" ), &RJPointable::set_pointingPriority ); + ClassDB::bind_method( D_METHOD( "get_pointingPriority"), &RJPointable::get_pointingPriority); + ADD_PROPERTY(PropertyInfo( Variant::INT, "pointingPriority" ), "set_pointingPriority", "get_pointingPriority" ); + + // onPointed: RJAction* + ClassDB::bind_method( D_METHOD( "set_onPointed", "onPointed" ), &RJPointable::set_onPointed ); + ClassDB::bind_method( D_METHOD( "get_onPointed"), &RJPointable::get_onPointed); + ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "onPointed", PROPERTY_HINT_NODE_TYPE ), "set_onPointed", "get_onPointed" ); + + // onUnpointed: RJAction* + ClassDB::bind_method( D_METHOD( "set_onUnpointed", "onUnpointed" ), &RJPointable::set_onUnpointed ); + ClassDB::bind_method( D_METHOD( "get_onUnpointed"), &RJPointable::get_onUnpointed); + ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "onUnpointed", PROPERTY_HINT_NODE_TYPE ), "set_onUnpointed", "get_onUnpointed" ); + + // onPointerAdded: RJAction* + ClassDB::bind_method( D_METHOD( "set_onPointerAdded", "onPointerAdded" ), &RJPointable::set_onPointerAdded ); + ClassDB::bind_method( D_METHOD( "get_onPointerAdded"), &RJPointable::get_onPointerAdded); + ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "onPointerAdded", PROPERTY_HINT_NODE_TYPE ), "set_onPointerAdded", "get_onPointerAdded" ); + + // onPointerRemoved: RJAction* + ClassDB::bind_method( D_METHOD( "set_onPointerRemoved", "onPointerRemoved" ), &RJPointable::set_onPointerRemoved ); + ClassDB::bind_method( D_METHOD( "get_onPointerRemoved"), &RJPointable::get_onPointerRemoved); + ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "onPointerRemoved", PROPERTY_HINT_NODE_TYPE ), "set_onPointerRemoved", "get_onPointerRemoved" ); + + GDVIRTUAL_BIND( updatePointerState, "pointer", "pointed" ); + GDVIRTUAL_BIND( getPointer, "index" ); + GDVIRTUAL_BIND( numPointing ); +} + +// Constructor +RJPointable::RJPointable() +{ + pointingPriority = 0; +} + +// Destructor +RJPointable::~RJPointable() +{ + +} + +// pointingPriority: int +int RJPointable::get_pointingPriority() { return pointingPriority; } +void RJPointable::set_pointingPriority( int p_pointingPriority ) { pointingPriority = p_pointingPriority; } + +// onPointed: RJAction* +RJAction* RJPointable::get_onPointed() const { return onPointed; } +void RJPointable::set_onPointed( RJAction* p_onPointed ) { onPointed = p_onPointed; } + +// onUnpointed: RJAction* +RJAction* RJPointable::get_onUnpointed() const { return onUnpointed; } +void RJPointable::set_onUnpointed( RJAction* p_onUnpointed ) { onUnpointed = p_onUnpointed; } + +// onPointerAdded: RJAction* +RJAction* RJPointable::get_onPointerAdded() const { return onPointerAdded; } +void RJPointable::set_onPointerAdded( RJAction* p_onPointerAdded ) { onPointerAdded = p_onPointerAdded; } + +// onPointerRemoved: RJAction* +RJAction* RJPointable::get_onPointerRemoved() const { return onPointerRemoved; } +void RJPointable::set_onPointerRemoved( RJAction* p_onPointerRemoved ) { onPointerRemoved = p_onPointerRemoved; } + + + diff --git a/RJPointable.h b/RJPointable.h new file mode 100644 index 0000000..e8e0e5e --- /dev/null +++ b/RJPointable.h @@ -0,0 +1,75 @@ + +/* RJPointable.h */ + +#ifndef ROKOJORI__POINTABLE_H +#define ROKOJORI__POINTABLE_H + +#include "./RJGodotHeaders.h" +#include "./RJAction.h" +#include "./RJPointer.h" +#include "scene/3d/node_3d.h" + +template class Ref; +class RJPointer; + + +class RJPointable : public Node3D +{ + GDCLASS( RJPointable, Node3D ); + +protected: + static void _bind_methods(); + + + + // pointingPriority : int + int pointingPriority; + + // onPointed : RJAction* + RJAction* onPointed = nullptr; + + // onUnpointed : RJAction* + RJAction* onUnpointed = nullptr; + + // onPointerAdded : RJAction* + RJAction* onPointerAdded = nullptr; + + // onPointerRemoved : RJAction* + RJAction* onPointerRemoved = nullptr; + +public: + + + // pointingPriority : int + int get_pointingPriority(); void set_pointingPriority( int p_pointingPriority ); + + // onPointed : RJAction* + RJAction* get_onPointed() const; void set_onPointed( RJAction* p_onPointed ); + + // onUnpointed : RJAction* + RJAction* get_onUnpointed() const; void set_onUnpointed( RJAction* p_onUnpointed ); + + // onPointerAdded : RJAction* + RJAction* get_onPointerAdded() const; void set_onPointerAdded( RJAction* p_onPointerAdded ); + + // onPointerRemoved : RJAction* + RJAction* get_onPointerRemoved() const; void set_onPointerRemoved( RJAction* p_onPointerRemoved ); + + // updatePointerState( Ref pointer, bool pointed ) : void + GDVIRTUAL2( updatePointerState, Ref, bool ); + + // getPointer( int index ) : Ref + GDVIRTUAL1R( Ref, getPointer, int ); + + // numPointing() : int + GDVIRTUAL0R( int, numPointing ); + + // Constructor + RJPointable(); + + // Destructor + ~RJPointable(); +}; + + +#endif // ROKOJORI__POINTABLE_H diff --git a/RJPointer.cpp b/RJPointer.cpp new file mode 100644 index 0000000..ae0285d --- /dev/null +++ b/RJPointer.cpp @@ -0,0 +1,34 @@ + +/* RJPointer.cpp */ + +#include "RJPointer.h" + +// Registers fields, signals and methods for Godot +void RJPointer::_bind_methods() +{ + // caster: RJCaster* + ClassDB::bind_method( D_METHOD( "set_caster", "caster" ), &RJPointer::set_caster ); + ClassDB::bind_method( D_METHOD( "get_caster"), &RJPointer::get_caster); + ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "caster", PROPERTY_HINT_NODE_TYPE ), "set_caster", "get_caster" ); + + GDVIRTUAL_BIND( getPointable, "index" ); +} + +// Constructor +RJPointer::RJPointer() +{ + +} + +// Destructor +RJPointer::~RJPointer() +{ + +} + +// caster: RJCaster* +RJCaster* RJPointer::get_caster() const { return caster; } +void RJPointer::set_caster( RJCaster* p_caster ) { caster = p_caster; } + + + diff --git a/RJPointer.h b/RJPointer.h new file mode 100644 index 0000000..e751970 --- /dev/null +++ b/RJPointer.h @@ -0,0 +1,45 @@ + +/* RJPointer.h */ + +#ifndef ROKOJORI__POINTER_H +#define ROKOJORI__POINTER_H + +#include "./RJGodotHeaders.h" +#include "./RJCaster.h" +#include "./RJPointable.h" +#include "scene/3d/node_3d.h" + +template class Ref; +class RJPointable; + + +class RJPointer : public Node3D +{ + GDCLASS( RJPointer, Node3D ); + +protected: + static void _bind_methods(); + + + + // caster : RJCaster* + RJCaster* caster = nullptr; + +public: + + + // caster : RJCaster* + RJCaster* get_caster() const; void set_caster( RJCaster* p_caster ); + + // getPointable( int index ) : Ref + GDVIRTUAL1R( Ref, getPointable, int ); + + // Constructor + RJPointer(); + + // Destructor + ~RJPointer(); +}; + + +#endif // ROKOJORI__POINTER_H diff --git a/RJSelector.cpp b/RJSelector.cpp index c791594..38fc1c6 100644 --- a/RJSelector.cpp +++ b/RJSelector.cpp @@ -1,19 +1,26 @@ + /* RJSelector.cpp */ #include "RJSelector.h" - +// Registers fields, signals and methods for Godot void RJSelector::_bind_methods() { - GDVIRTUAL_BIND( select ); + GDVIRTUAL_BIND( selects, "node" ); } +// Constructor RJSelector::RJSelector() { - + } +// Destructor RJSelector::~RJSelector() { } + + + + diff --git a/RJSelector.h b/RJSelector.h index 4609e2d..15ef940 100644 --- a/RJSelector.h +++ b/RJSelector.h @@ -1,27 +1,38 @@ + /* RJSelector.h */ #ifndef ROKOJORI__SELECTOR_H #define ROKOJORI__SELECTOR_H +#include "./RJGodotHeaders.h" #include "scene/main/node.h" #include "core/io/resource.h" + + + class RJSelector : public Resource { - GDCLASS(RJSelector, Resource); - + GDCLASS( RJSelector, Resource ); protected: static void _bind_methods(); + - GDVIRTUAL1R( bool, select, Ref) + public: - RJSelector(); - ~RJSelector(); + + // selects( Ref node ) : bool + GDVIRTUAL1R( bool, selects, Ref ); + // Constructor + RJSelector(); + + // Destructor + ~RJSelector(); }; -#endif // ROKOJORI__SELECTOR_H \ No newline at end of file +#endif // ROKOJORI__SELECTOR_H diff --git a/RJSensor.cpp b/RJSensor.cpp index 271cbbe..4c68d08 100644 --- a/RJSensor.cpp +++ b/RJSensor.cpp @@ -1,23 +1,29 @@ + /* RJSensor.cpp */ #include "RJSensor.h" - +// Registers fields, signals and methods for Godot void RJSensor::_bind_methods() { GDVIRTUAL_BIND( getValue ); GDVIRTUAL_BIND( isActive ); GDVIRTUAL_BIND( wasActive ); - GDVIRTUAL_BIND( updateValue ); - + GDVIRTUAL_BIND( updateValue, "value" ); } +// Constructor RJSensor::RJSensor() { - + } +// Destructor RJSensor::~RJSensor() { } + + + + diff --git a/RJSensor.h b/RJSensor.h index 4e2c98e..cae8559 100644 --- a/RJSensor.h +++ b/RJSensor.h @@ -1,28 +1,46 @@ + /* RJSensor.h */ #ifndef ROKOJORI__SENSOR_H #define ROKOJORI__SENSOR_H +#include "./RJGodotHeaders.h" #include "./RJNetworkNode.h" + + class RJSensor : public RJNetworkNode { - GDCLASS(RJSensor, RJNetworkNode); + GDCLASS( RJSensor, RJNetworkNode ); protected: static void _bind_methods(); + + + public: + + // getValue() : float GDVIRTUAL0R( float, getValue ); + + // isActive() : bool GDVIRTUAL0R( bool, isActive ); + + // wasActive() : bool GDVIRTUAL0R( bool, wasActive ); + + // updateValue( float value ) : void GDVIRTUAL1( updateValue, float ); + // Constructor RJSensor(); + + // Destructor ~RJSensor(); }; -#endif // ROKOJORI__SENSOR_H \ No newline at end of file +#endif // ROKOJORI__SENSOR_H diff --git a/RJSequenceAction.cpp b/RJSequenceAction.cpp index c7d7103..d1b9826 100644 --- a/RJSequenceAction.cpp +++ b/RJSequenceAction.cpp @@ -6,7 +6,7 @@ void RJSequenceAction::_bind_methods() { - GDVIRTUAL_BIND( cancelAction ); + GDVIRTUAL_BIND( cancelAction, "id" ); ClassDB::bind_method( D_METHOD( "dispatchStart" ) , &RJSequenceAction::dispatchStart ); ClassDB::bind_method( D_METHOD( "dispatchCancelled" ) , &RJSequenceAction::dispatchCancelled ); diff --git a/RJStringProperty.cpp b/RJStringProperty.cpp deleted file mode 100644 index 46bd149..0000000 --- a/RJStringProperty.cpp +++ /dev/null @@ -1,25 +0,0 @@ - -/* RJStringProperty.cpp */ - -#include "RJStringProperty.h" - - -void RJStringProperty::_bind_methods() -{ - GDVIRTUAL_BIND( set, "value" ); - GDVIRTUAL_BIND( get ); - ADD_SIGNAL (MethodInfo( "onChange" ) ); -} - -RJStringProperty::RJStringProperty() -{ - -} - -RJStringProperty::~RJStringProperty() -{ - -} - - - diff --git a/RJStringProperty.h b/RJStringProperty.h deleted file mode 100644 index 409f4e5..0000000 --- a/RJStringProperty.h +++ /dev/null @@ -1,33 +0,0 @@ - -/* RJStringProperty.h */ - -#ifndef ROKOJORI__STRING_PROPERTY_H -#define ROKOJORI__STRING_PROPERTY_H - - -#include "./RJNetworkNode.h" - - -class RJStringProperty : public RJNetworkNode -{ - GDCLASS(RJStringProperty, RJNetworkNode); - -protected: - static void _bind_methods(); - - - - -public: - - GDVIRTUAL1( set, String ); - GDVIRTUAL0R( String, get ); - /* signal onChange */ - - RJStringProperty(); - - ~RJStringProperty(); -}; - - -#endif // ROKOJORI__STRING_PROPERTY_H diff --git a/RJTimeLine.cpp b/RJTimeLine.cpp index 29a2bcd..b109540 100644 --- a/RJTimeLine.cpp +++ b/RJTimeLine.cpp @@ -3,36 +3,37 @@ #include "RJTimeLine.h" - +// Registers fields, signals and methods for Godot void RJTimeLine::_bind_methods() { - /* isLooping: bool */ - ClassDB::bind_method(D_METHOD("get_isLooping"), &RJTimeLine::get_isLooping); - ClassDB::bind_method(D_METHOD("set_isLooping"), &RJTimeLine::set_isLooping); - ADD_PROPERTY(PropertyInfo(Variant::BOOL, "isLooping"), "set_isLooping", "get_isLooping"); + // isLooping: bool + ClassDB::bind_method( D_METHOD( "set_isLooping", "isLooping" ), &RJTimeLine::set_isLooping ); + ClassDB::bind_method( D_METHOD( "get_isLooping"), &RJTimeLine::get_isLooping); + ADD_PROPERTY(PropertyInfo( Variant::BOOL, "isLooping" ), "set_isLooping", "get_isLooping" ); - /* loopStart: float */ - ClassDB::bind_method(D_METHOD("get_loopStart"), &RJTimeLine::get_loopStart); - ClassDB::bind_method(D_METHOD("set_loopStart"), &RJTimeLine::set_loopStart); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "loopStart"), "set_loopStart", "get_loopStart"); + // loopStart: float + ClassDB::bind_method( D_METHOD( "set_loopStart", "loopStart" ), &RJTimeLine::set_loopStart ); + ClassDB::bind_method( D_METHOD( "get_loopStart"), &RJTimeLine::get_loopStart); + ADD_PROPERTY(PropertyInfo( Variant::FLOAT, "loopStart" ), "set_loopStart", "get_loopStart" ); - /* loopEnd: float */ - ClassDB::bind_method(D_METHOD("get_loopEnd"), &RJTimeLine::get_loopEnd); - ClassDB::bind_method(D_METHOD("set_loopEnd"), &RJTimeLine::set_loopEnd); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "loopEnd"), "set_loopEnd", "get_loopEnd"); + // loopEnd: float + ClassDB::bind_method( D_METHOD( "set_loopEnd", "loopEnd" ), &RJTimeLine::set_loopEnd ); + ClassDB::bind_method( D_METHOD( "get_loopEnd"), &RJTimeLine::get_loopEnd); + ADD_PROPERTY(PropertyInfo( Variant::FLOAT, "loopEnd" ), "set_loopEnd", "get_loopEnd" ); - /* startSpeed: float */ - ClassDB::bind_method(D_METHOD("get_startSpeed"), &RJTimeLine::get_startSpeed); - ClassDB::bind_method(D_METHOD("set_startSpeed"), &RJTimeLine::set_startSpeed); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "startSpeed"), "set_startSpeed", "get_startSpeed"); + // startSpeed: float + ClassDB::bind_method( D_METHOD( "set_startSpeed", "startSpeed" ), &RJTimeLine::set_startSpeed ); + ClassDB::bind_method( D_METHOD( "get_startSpeed"), &RJTimeLine::get_startSpeed); + ADD_PROPERTY(PropertyInfo( Variant::FLOAT, "startSpeed" ), "set_startSpeed", "get_startSpeed" ); - /* autoStart: bool */ - ClassDB::bind_method(D_METHOD("get_autoStart"), &RJTimeLine::get_autoStart); - ClassDB::bind_method(D_METHOD("set_autoStart"), &RJTimeLine::set_autoStart); - ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autoStart"), "set_autoStart", "get_autoStart"); + // autoStart: bool + ClassDB::bind_method( D_METHOD( "set_autoStart", "autoStart" ), &RJTimeLine::set_autoStart ); + ClassDB::bind_method( D_METHOD( "get_autoStart"), &RJTimeLine::get_autoStart); + ADD_PROPERTY(PropertyInfo( Variant::BOOL, "autoStart" ), "set_autoStart", "get_autoStart" ); } +// Constructor RJTimeLine::RJTimeLine() { isLooping = false; @@ -42,29 +43,31 @@ RJTimeLine::RJTimeLine() autoStart = false; } +// Destructor RJTimeLine::~RJTimeLine() { } -/* isLooping: bool */ +// isLooping: bool bool RJTimeLine::get_isLooping() { return isLooping; } void RJTimeLine::set_isLooping( bool p_isLooping ) { isLooping = p_isLooping; } -/* loopStart: float */ +// loopStart: float float RJTimeLine::get_loopStart() { return loopStart; } void RJTimeLine::set_loopStart( float p_loopStart ) { loopStart = p_loopStart; } -/* loopEnd: float */ +// loopEnd: float float RJTimeLine::get_loopEnd() { return loopEnd; } void RJTimeLine::set_loopEnd( float p_loopEnd ) { loopEnd = p_loopEnd; } -/* startSpeed: float */ +// startSpeed: float float RJTimeLine::get_startSpeed() { return startSpeed; } void RJTimeLine::set_startSpeed( float p_startSpeed ) { startSpeed = p_startSpeed; } -/* autoStart: bool */ +// autoStart: bool bool RJTimeLine::get_autoStart() { return autoStart; } void RJTimeLine::set_autoStart( bool p_autoStart ) { autoStart = p_autoStart; } + diff --git a/RJTimeLine.h b/RJTimeLine.h index 8ea309f..22d574f 100644 --- a/RJTimeLine.h +++ b/RJTimeLine.h @@ -4,34 +4,58 @@ #ifndef ROKOJORI__TIME_LINE_H #define ROKOJORI__TIME_LINE_H - +#include "./RJGodotHeaders.h" #include "core/io/resource.h" + + class RJTimeLine : public Resource { - GDCLASS(RJTimeLine, Resource); + GDCLASS( RJTimeLine, Resource ); protected: static void _bind_methods(); + + // isLooping : bool bool isLooping; + + // loopStart : float float loopStart; + + // loopEnd : float float loopEnd; + + // startSpeed : float float startSpeed; + + // autoStart : bool bool autoStart; public: + + // isLooping : bool bool get_isLooping(); void set_isLooping( bool p_isLooping ); + + // loopStart : float float get_loopStart(); void set_loopStart( float p_loopStart ); + + // loopEnd : float float get_loopEnd(); void set_loopEnd( float p_loopEnd ); + + // startSpeed : float float get_startSpeed(); void set_startSpeed( float p_startSpeed ); + + // autoStart : bool bool get_autoStart(); void set_autoStart( bool p_autoStart ); + // Constructor RJTimeLine(); - + + // Destructor ~RJTimeLine(); }; diff --git a/RJTimeLineManager.cpp b/RJTimeLineManager.cpp index 9ac9fa1..c49f832 100644 --- a/RJTimeLineManager.cpp +++ b/RJTimeLineManager.cpp @@ -3,7 +3,7 @@ #include "RJTimeLineManager.h" - +// Registers fields, signals and methods for Godot void RJTimeLineManager::_bind_methods() { GDVIRTUAL_BIND( getTimeLineIndex, "timeLine" ); @@ -22,11 +22,13 @@ void RJTimeLineManager::_bind_methods() ADD_SIGNAL (MethodInfo( "onSpan" , PropertyInfo(Variant::INT, "callbackID"), PropertyInfo(Variant::INT, "spanType")) ); } +// Constructor RJTimeLineManager::RJTimeLineManager() { } +// Destructor RJTimeLineManager::~RJTimeLineManager() { @@ -34,3 +36,4 @@ RJTimeLineManager::~RJTimeLineManager() + diff --git a/RJTimeLineManager.h b/RJTimeLineManager.h index 7e382f0..da76085 100644 --- a/RJTimeLineManager.h +++ b/RJTimeLineManager.h @@ -4,13 +4,16 @@ #ifndef ROKOJORI__TIME_LINE_MANAGER_H #define ROKOJORI__TIME_LINE_MANAGER_H +#include "./RJGodotHeaders.h" #include "./RJTimeLine.h" #include "./RJNetworkNode.h" + + class RJTimeLineManager : public RJNetworkNode { - GDCLASS(RJTimeLineManager, RJNetworkNode); + GDCLASS( RJTimeLineManager, RJNetworkNode ); protected: static void _bind_methods(); @@ -20,23 +23,51 @@ protected: public: + + // getTimeLineIndex( Ref timeLine ) : int GDVIRTUAL1R( int, getTimeLineIndex, Ref ); + + // getTimeLineSize() : int GDVIRTUAL0R( int, getTimeLineSize ); + + // createID() : int GDVIRTUAL0R( int, createID ); + + // getLastPosition( int timeLineIndex ) : double GDVIRTUAL1R( double, getLastPosition, int ); + + // getPosition( int timeLineIndex ) : double GDVIRTUAL1R( double, getPosition, int ); + + // setPosition( int timeLineIndex, double position ) : void GDVIRTUAL2( setPosition, int, double ); + + // getSpeed( int timeLineIndex ) : double GDVIRTUAL1R( double, getSpeed, int ); + + // setSpeed( int timeLineIndex, double speed ) : void GDVIRTUAL2( setSpeed, int, double ); + + // getPlayState( int timeLineIndex ) : bool GDVIRTUAL1R( bool, getPlayState, int ); + + // setPlayState( int timeLineIndex, bool playState ) : void GDVIRTUAL2( setPlayState, int, bool ); + + // scheduleEvent( int timeLineIndex, double position, int callbackID, bool isPersistent ) : void GDVIRTUAL4( scheduleEvent, int, double, int, bool ); + + // scheduleSpan( int timeLineIndex, double startPosition, double endPosition, int callbackID, bool isPersistent ) : void GDVIRTUAL5( scheduleSpan, int, double, double, int, bool ); - /* signal onEvent */ - /* signal onSpan */ + + // [signal] onEvent( int callbackID ) : void + + // [signal] onSpan( int callbackID, int spanType ) : void + // Constructor RJTimeLineManager(); - + + // Destructor ~RJTimeLineManager(); }; diff --git a/RJUpdatable.cpp b/RJUpdatable.cpp index da617a2..defa211 100644 --- a/RJUpdatable.cpp +++ b/RJUpdatable.cpp @@ -3,17 +3,19 @@ #include "RJUpdatable.h" - +// Registers fields, signals and methods for Godot void RJUpdatable::_bind_methods() { GDVIRTUAL_BIND( update, "delta" ); } +// Constructor RJUpdatable::RJUpdatable() { } +// Destructor RJUpdatable::~RJUpdatable() { @@ -21,3 +23,4 @@ RJUpdatable::~RJUpdatable() + diff --git a/RJUpdatable.h b/RJUpdatable.h index 0640545..c64d74b 100644 --- a/RJUpdatable.h +++ b/RJUpdatable.h @@ -4,13 +4,15 @@ #ifndef ROKOJORI__UPDATABLE_H #define ROKOJORI__UPDATABLE_H - +#include "./RJGodotHeaders.h" #include "./RJNetworkNode.h" + + class RJUpdatable : public RJNetworkNode { - GDCLASS(RJUpdatable, RJNetworkNode); + GDCLASS( RJUpdatable, RJNetworkNode ); protected: static void _bind_methods(); @@ -20,10 +22,14 @@ protected: public: + + // update( double delta ) : void GDVIRTUAL1( update, double ); + // Constructor RJUpdatable(); - + + // Destructor ~RJUpdatable(); }; diff --git a/RJVirtualCamera3D.cpp b/RJVirtualCamera3D.cpp index 739af88..487c4fd 100644 --- a/RJVirtualCamera3D.cpp +++ b/RJVirtualCamera3D.cpp @@ -3,7 +3,7 @@ #include "RJVirtualCamera3D.h" - +// Registers fields, signals and methods for Godot void RJVirtualCamera3D::_bind_methods() { GDVIRTUAL_BIND( getCameraPosition ); @@ -11,11 +11,13 @@ void RJVirtualCamera3D::_bind_methods() GDVIRTUAL_BIND( getCameraFOV ); } +// Constructor RJVirtualCamera3D::RJVirtualCamera3D() { } +// Destructor RJVirtualCamera3D::~RJVirtualCamera3D() { @@ -23,3 +25,4 @@ RJVirtualCamera3D::~RJVirtualCamera3D() + diff --git a/RJVirtualCamera3D.h b/RJVirtualCamera3D.h index 60859ee..38c4dbc 100644 --- a/RJVirtualCamera3D.h +++ b/RJVirtualCamera3D.h @@ -4,13 +4,15 @@ #ifndef ROKOJORI__VIRTUAL_CAMERA_3_D_H #define ROKOJORI__VIRTUAL_CAMERA_3_D_H - +#include "./RJGodotHeaders.h" #include "scene/3d/node_3d.h" + + class RJVirtualCamera3D : public Node3D { - GDCLASS(RJVirtualCamera3D, Node3D); + GDCLASS( RJVirtualCamera3D, Node3D ); protected: static void _bind_methods(); @@ -20,12 +22,20 @@ protected: public: + + // getCameraPosition() : Vector3 GDVIRTUAL0R( Vector3, getCameraPosition ); + + // getCameraRotation() : Quaternion GDVIRTUAL0R( Quaternion, getCameraRotation ); + + // getCameraFOV() : float GDVIRTUAL0R( float, getCameraFOV ); + // Constructor RJVirtualCamera3D(); - + + // Destructor ~RJVirtualCamera3D(); }; diff --git a/RJVirtualCamera3DManager.cpp b/RJVirtualCamera3DManager.cpp index af43552..7b81bb4 100644 --- a/RJVirtualCamera3DManager.cpp +++ b/RJVirtualCamera3DManager.cpp @@ -3,7 +3,7 @@ #include "RJVirtualCamera3DManager.h" - +// Registers fields, signals and methods for Godot void RJVirtualCamera3DManager::_bind_methods() { GDVIRTUAL_BIND( getCamera, "cameraIndex" ); @@ -11,35 +11,38 @@ void RJVirtualCamera3DManager::_bind_methods() GDVIRTUAL_BIND( getCameraSize ); GDVIRTUAL_BIND( getCameraPriority, "cameraIndex" ); GDVIRTUAL_BIND( setCameraPriority, "cameraIndex", "priority" ); - /* cameraPrioritySmoothingCoefficient: float */ - ClassDB::bind_method(D_METHOD("get_cameraPrioritySmoothingCoefficient"), &RJVirtualCamera3DManager::get_cameraPrioritySmoothingCoefficient); - ClassDB::bind_method(D_METHOD("set_cameraPrioritySmoothingCoefficient"), &RJVirtualCamera3DManager::set_cameraPrioritySmoothingCoefficient); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "cameraPrioritySmoothingCoefficient"), "set_cameraPrioritySmoothingCoefficient", "get_cameraPrioritySmoothingCoefficient"); + // 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("get_cameraPrioritySmoothingStepFPS"), &RJVirtualCamera3DManager::get_cameraPrioritySmoothingStepFPS); - ClassDB::bind_method(D_METHOD("set_cameraPrioritySmoothingStepFPS"), &RJVirtualCamera3DManager::set_cameraPrioritySmoothingStepFPS); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "cameraPrioritySmoothingStepFPS"), "set_cameraPrioritySmoothingStepFPS", "get_cameraPrioritySmoothingStepFPS"); + // 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 */ +// cameraPrioritySmoothingCoefficient: float float RJVirtualCamera3DManager::get_cameraPrioritySmoothingCoefficient() { return cameraPrioritySmoothingCoefficient; } void RJVirtualCamera3DManager::set_cameraPrioritySmoothingCoefficient( float p_cameraPrioritySmoothingCoefficient ) { cameraPrioritySmoothingCoefficient = p_cameraPrioritySmoothingCoefficient; } -/* cameraPrioritySmoothingStepFPS: float */ +// cameraPrioritySmoothingStepFPS: float float RJVirtualCamera3DManager::get_cameraPrioritySmoothingStepFPS() { return cameraPrioritySmoothingStepFPS; } void RJVirtualCamera3DManager::set_cameraPrioritySmoothingStepFPS( float p_cameraPrioritySmoothingStepFPS ) { cameraPrioritySmoothingStepFPS = p_cameraPrioritySmoothingStepFPS; } + diff --git a/RJVirtualCamera3DManager.h b/RJVirtualCamera3DManager.h index efe6d34..2d4e44b 100644 --- a/RJVirtualCamera3DManager.h +++ b/RJVirtualCamera3DManager.h @@ -4,33 +4,56 @@ #ifndef ROKOJORI__VIRTUAL_CAMERA_3_D_MANAGER_H #define ROKOJORI__VIRTUAL_CAMERA_3_D_MANAGER_H +#include "./RJGodotHeaders.h" #include "./RJVirtualCamera3D.h" #include "./RJNetworkNode.h" + + class RJVirtualCamera3DManager : public RJNetworkNode { - GDCLASS(RJVirtualCamera3DManager, RJNetworkNode); + GDCLASS( RJVirtualCamera3DManager, RJNetworkNode ); protected: static void _bind_methods(); + + // cameraPrioritySmoothingCoefficient : float float cameraPrioritySmoothingCoefficient; + + // cameraPrioritySmoothingStepFPS : float float cameraPrioritySmoothingStepFPS; public: + + // getCamera( int cameraIndex ) : Ref GDVIRTUAL1R( Ref, getCamera, int ); + + // getCameraIndex( Ref timeLine ) : int GDVIRTUAL1R( int, getCameraIndex, Ref ); + + // getCameraSize() : int GDVIRTUAL0R( int, getCameraSize ); + + // getCameraPriority( int cameraIndex ) : float GDVIRTUAL1R( float, getCameraPriority, int ); + + // setCameraPriority( int cameraIndex, float priority ) : void GDVIRTUAL2( setCameraPriority, int, float ); + + // cameraPrioritySmoothingCoefficient : float float get_cameraPrioritySmoothingCoefficient(); void set_cameraPrioritySmoothingCoefficient( float p_cameraPrioritySmoothingCoefficient ); + + // cameraPrioritySmoothingStepFPS : float float get_cameraPrioritySmoothingStepFPS(); void set_cameraPrioritySmoothingStepFPS( float p_cameraPrioritySmoothingStepFPS ); + // Constructor RJVirtualCamera3DManager(); - + + // Destructor ~RJVirtualCamera3DManager(); }; diff --git a/register_types.cpp b/register_types.cpp index 2adb469..45bfa87 100644 --- a/register_types.cpp +++ b/register_types.cpp @@ -4,20 +4,20 @@ #include "core/object/class_db.h" -#include "./RJNetworkNode.h" #include "./RJAction.h" +#include "./RJCaster.h" +#include "./RJIntProperty.h" +#include "./RJNetworkNode.h" +#include "./RJPointable.h" +#include "./RJPointer.h" #include "./RJSelector.h" #include "./RJSensor.h" #include "./RJSequenceAction.h" -#include "./RJUpdatable.h" #include "./RJTimeLine.h" #include "./RJTimeLineManager.h" +#include "./RJUpdatable.h" #include "./RJVirtualCamera3D.h" #include "./RJVirtualCamera3DManager.h" -#include "./RJBoolProperty.h" -#include "./RJNodeProperty.h" -#include "./RJNumberProperty.h" -#include "./RJStringProperty.h" void initialize_rokojori_action_library_module( ModuleInitializationLevel p_level ) { @@ -26,20 +26,20 @@ void initialize_rokojori_action_library_module( ModuleInitializationLevel p_leve return; } - ClassDB::register_class(); ClassDB::register_class(); + ClassDB::register_class(); + ClassDB::register_class(); + ClassDB::register_class(); + ClassDB::register_class(); + ClassDB::register_class(); ClassDB::register_class(); ClassDB::register_class(); ClassDB::register_class(); - ClassDB::register_class(); ClassDB::register_class(); ClassDB::register_class(); + ClassDB::register_class(); ClassDB::register_class(); ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); } void uninitialize_rokojori_action_library_module( ModuleInitializationLevel p_level )