Caster/Pointer/Pointable
This commit is contained in:
parent
650c34164a
commit
29c6666c18
|
@ -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()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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
|
|
|
@ -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<RJSelector>
|
||||||
|
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<RJSelector>
|
||||||
|
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<RJSelector>
|
||||||
|
Ref<RJSelector> RJCaster::get_includeSelector() const { return includeSelector; }
|
||||||
|
void RJCaster::set_includeSelector( const Ref<RJSelector> &p_includeSelector ) { includeSelector = p_includeSelector; }
|
||||||
|
|
||||||
|
// excludeSelector: Ref<RJSelector>
|
||||||
|
Ref<RJSelector> RJCaster::get_excludeSelector() const { return excludeSelector; }
|
||||||
|
void RJCaster::set_excludeSelector( const Ref<RJSelector> &p_excludeSelector ) { excludeSelector = p_excludeSelector; }
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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<RJSelector>
|
||||||
|
Ref<RJSelector> includeSelector;
|
||||||
|
|
||||||
|
// excludeSelector : Ref<RJSelector>
|
||||||
|
Ref<RJSelector> 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<RJSelector>
|
||||||
|
Ref<RJSelector> get_includeSelector() const; void set_includeSelector( const Ref<RJSelector> &p_includeSelector );
|
||||||
|
|
||||||
|
// excludeSelector : Ref<RJSelector>
|
||||||
|
Ref<RJSelector> get_excludeSelector() const; void set_excludeSelector( const Ref<RJSelector> &p_excludeSelector );
|
||||||
|
|
||||||
|
// numColliders() : int
|
||||||
|
GDVIRTUAL0R( int, numColliders );
|
||||||
|
|
||||||
|
// getCollider( int index ) : Ref<Node>
|
||||||
|
GDVIRTUAL1R( Ref<Node>, getCollider, int );
|
||||||
|
|
||||||
|
// getCollisionPosition( int index ) : Vector3
|
||||||
|
GDVIRTUAL1R( Vector3, getCollisionPosition, int );
|
||||||
|
|
||||||
|
// getCollisionNormal( int index ) : Vector3
|
||||||
|
GDVIRTUAL1R( Vector3, getCollisionNormal, int );
|
||||||
|
|
||||||
|
// getCollisionShape( int index ) : Ref<Shape3D>
|
||||||
|
GDVIRTUAL1R( Ref<Shape3D>, getCollisionShape, int );
|
||||||
|
|
||||||
|
// Constructor
|
||||||
|
RJCaster();
|
||||||
|
|
||||||
|
// Destructor
|
||||||
|
~RJCaster();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ROKOJORI__CASTER_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
|
|
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
|
@ -1,18 +1,26 @@
|
||||||
|
|
||||||
/* RJNetworkNode.cpp */
|
/* RJNetworkNode.cpp */
|
||||||
|
|
||||||
#include "RJNetworkNode.h"
|
#include "RJNetworkNode.h"
|
||||||
|
|
||||||
|
// Registers fields, signals and methods for Godot
|
||||||
void RJNetworkNode::_bind_methods()
|
void RJNetworkNode::_bind_methods()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Constructor
|
||||||
RJNetworkNode::RJNetworkNode()
|
RJNetworkNode::RJNetworkNode()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Destructor
|
||||||
RJNetworkNode::~RJNetworkNode()
|
RJNetworkNode::~RJNetworkNode()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
/* RJNetworkNode.h */
|
/* RJNetworkNode.h */
|
||||||
|
|
||||||
#ifndef ROKOJORI__NETWORK_NODE_H
|
#ifndef ROKOJORI__NETWORK_NODE_H
|
||||||
|
@ -5,19 +6,26 @@
|
||||||
|
|
||||||
#include "scene/main/node.h"
|
#include "scene/main/node.h"
|
||||||
|
|
||||||
|
|
||||||
class RJNetworkNode : public Node
|
class RJNetworkNode : public Node
|
||||||
{
|
{
|
||||||
GDCLASS(RJNetworkNode, Node);
|
GDCLASS( RJNetworkNode, Node );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static void _bind_methods();
|
static void _bind_methods();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Constructor
|
||||||
RJNetworkNode();
|
RJNetworkNode();
|
||||||
|
|
||||||
|
// Destructor
|
||||||
~RJNetworkNode();
|
~RJNetworkNode();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif // ROKOJORI__NETWORK_NODE_H
|
#endif // ROKOJORI__NETWORK_NODE_H
|
||||||
|
|
|
@ -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()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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<Node> );
|
|
||||||
GDVIRTUAL0R( Ref<Node>, get );
|
|
||||||
/* signal onChange */
|
|
||||||
|
|
||||||
RJNodeProperty();
|
|
||||||
|
|
||||||
~RJNodeProperty();
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#endif // ROKOJORI__NODE_PROPERTY_H
|
|
|
@ -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()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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<RJAction>, get_onChanged );
|
|
||||||
GDVIRTUAL1( set_onChanged, Ref<RJAction> );
|
|
||||||
|
|
||||||
RJNumberProperty();
|
|
||||||
|
|
||||||
~RJNumberProperty();
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#endif // ROKOJORI__NUMBER_PROPERTY_H
|
|
|
@ -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; }
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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<typename Type> 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<RJPointer> pointer, bool pointed ) : void
|
||||||
|
GDVIRTUAL2( updatePointerState, Ref<RJPointer>, bool );
|
||||||
|
|
||||||
|
// getPointer( int index ) : Ref<RJPointer>
|
||||||
|
GDVIRTUAL1R( Ref<RJPointer>, getPointer, int );
|
||||||
|
|
||||||
|
// numPointing() : int
|
||||||
|
GDVIRTUAL0R( int, numPointing );
|
||||||
|
|
||||||
|
// Constructor
|
||||||
|
RJPointable();
|
||||||
|
|
||||||
|
// Destructor
|
||||||
|
~RJPointable();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ROKOJORI__POINTABLE_H
|
|
@ -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; }
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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<typename Type> 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<RJPointable>
|
||||||
|
GDVIRTUAL1R( Ref<RJPointable>, getPointable, int );
|
||||||
|
|
||||||
|
// Constructor
|
||||||
|
RJPointer();
|
||||||
|
|
||||||
|
// Destructor
|
||||||
|
~RJPointer();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ROKOJORI__POINTER_H
|
|
@ -1,19 +1,26 @@
|
||||||
|
|
||||||
/* RJSelector.cpp */
|
/* RJSelector.cpp */
|
||||||
|
|
||||||
#include "RJSelector.h"
|
#include "RJSelector.h"
|
||||||
|
|
||||||
|
// Registers fields, signals and methods for Godot
|
||||||
void RJSelector::_bind_methods()
|
void RJSelector::_bind_methods()
|
||||||
{
|
{
|
||||||
GDVIRTUAL_BIND( select );
|
GDVIRTUAL_BIND( selects, "node" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Constructor
|
||||||
RJSelector::RJSelector()
|
RJSelector::RJSelector()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Destructor
|
||||||
RJSelector::~RJSelector()
|
RJSelector::~RJSelector()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
23
RJSelector.h
23
RJSelector.h
|
@ -1,27 +1,38 @@
|
||||||
|
|
||||||
/* RJSelector.h */
|
/* RJSelector.h */
|
||||||
|
|
||||||
#ifndef ROKOJORI__SELECTOR_H
|
#ifndef ROKOJORI__SELECTOR_H
|
||||||
#define ROKOJORI__SELECTOR_H
|
#define ROKOJORI__SELECTOR_H
|
||||||
|
|
||||||
|
#include "./RJGodotHeaders.h"
|
||||||
#include "scene/main/node.h"
|
#include "scene/main/node.h"
|
||||||
#include "core/io/resource.h"
|
#include "core/io/resource.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class RJSelector : public Resource
|
class RJSelector : public Resource
|
||||||
{
|
{
|
||||||
GDCLASS(RJSelector, Resource);
|
GDCLASS( RJSelector, Resource );
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static void _bind_methods();
|
static void _bind_methods();
|
||||||
|
|
||||||
|
|
||||||
GDVIRTUAL1R( bool, select, Ref<Node>)
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
RJSelector();
|
|
||||||
~RJSelector();
|
// selects( Ref<Node> node ) : bool
|
||||||
|
GDVIRTUAL1R( bool, selects, Ref<Node> );
|
||||||
|
|
||||||
|
// Constructor
|
||||||
|
RJSelector();
|
||||||
|
|
||||||
|
// Destructor
|
||||||
|
~RJSelector();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif // ROKOJORI__SELECTOR_H
|
#endif // ROKOJORI__SELECTOR_H
|
||||||
|
|
14
RJSensor.cpp
14
RJSensor.cpp
|
@ -1,23 +1,29 @@
|
||||||
|
|
||||||
/* RJSensor.cpp */
|
/* RJSensor.cpp */
|
||||||
|
|
||||||
#include "RJSensor.h"
|
#include "RJSensor.h"
|
||||||
|
|
||||||
|
// Registers fields, signals and methods for Godot
|
||||||
void RJSensor::_bind_methods()
|
void RJSensor::_bind_methods()
|
||||||
{
|
{
|
||||||
GDVIRTUAL_BIND( getValue );
|
GDVIRTUAL_BIND( getValue );
|
||||||
GDVIRTUAL_BIND( isActive );
|
GDVIRTUAL_BIND( isActive );
|
||||||
GDVIRTUAL_BIND( wasActive );
|
GDVIRTUAL_BIND( wasActive );
|
||||||
GDVIRTUAL_BIND( updateValue );
|
GDVIRTUAL_BIND( updateValue, "value" );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Constructor
|
||||||
RJSensor::RJSensor()
|
RJSensor::RJSensor()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Destructor
|
||||||
RJSensor::~RJSensor()
|
RJSensor::~RJSensor()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
22
RJSensor.h
22
RJSensor.h
|
@ -1,28 +1,46 @@
|
||||||
|
|
||||||
/* RJSensor.h */
|
/* RJSensor.h */
|
||||||
|
|
||||||
#ifndef ROKOJORI__SENSOR_H
|
#ifndef ROKOJORI__SENSOR_H
|
||||||
#define ROKOJORI__SENSOR_H
|
#define ROKOJORI__SENSOR_H
|
||||||
|
|
||||||
|
#include "./RJGodotHeaders.h"
|
||||||
#include "./RJNetworkNode.h"
|
#include "./RJNetworkNode.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class RJSensor : public RJNetworkNode
|
class RJSensor : public RJNetworkNode
|
||||||
{
|
{
|
||||||
GDCLASS(RJSensor, RJNetworkNode);
|
GDCLASS( RJSensor, RJNetworkNode );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static void _bind_methods();
|
static void _bind_methods();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
||||||
|
// getValue() : float
|
||||||
GDVIRTUAL0R( float, getValue );
|
GDVIRTUAL0R( float, getValue );
|
||||||
|
|
||||||
|
// isActive() : bool
|
||||||
GDVIRTUAL0R( bool, isActive );
|
GDVIRTUAL0R( bool, isActive );
|
||||||
|
|
||||||
|
// wasActive() : bool
|
||||||
GDVIRTUAL0R( bool, wasActive );
|
GDVIRTUAL0R( bool, wasActive );
|
||||||
|
|
||||||
|
// updateValue( float value ) : void
|
||||||
GDVIRTUAL1( updateValue, float );
|
GDVIRTUAL1( updateValue, float );
|
||||||
|
|
||||||
|
// Constructor
|
||||||
RJSensor();
|
RJSensor();
|
||||||
|
|
||||||
|
// Destructor
|
||||||
~RJSensor();
|
~RJSensor();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif // ROKOJORI__SENSOR_H
|
#endif // ROKOJORI__SENSOR_H
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
void RJSequenceAction::_bind_methods()
|
void RJSequenceAction::_bind_methods()
|
||||||
{
|
{
|
||||||
GDVIRTUAL_BIND( cancelAction );
|
GDVIRTUAL_BIND( cancelAction, "id" );
|
||||||
|
|
||||||
ClassDB::bind_method( D_METHOD( "dispatchStart" ) , &RJSequenceAction::dispatchStart );
|
ClassDB::bind_method( D_METHOD( "dispatchStart" ) , &RJSequenceAction::dispatchStart );
|
||||||
ClassDB::bind_method( D_METHOD( "dispatchCancelled" ) , &RJSequenceAction::dispatchCancelled );
|
ClassDB::bind_method( D_METHOD( "dispatchCancelled" ) , &RJSequenceAction::dispatchCancelled );
|
||||||
|
|
|
@ -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()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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
|
|
|
@ -3,36 +3,37 @@
|
||||||
|
|
||||||
#include "RJTimeLine.h"
|
#include "RJTimeLine.h"
|
||||||
|
|
||||||
|
// Registers fields, signals and methods for Godot
|
||||||
void RJTimeLine::_bind_methods()
|
void RJTimeLine::_bind_methods()
|
||||||
{
|
{
|
||||||
/* isLooping: bool */
|
// isLooping: bool
|
||||||
ClassDB::bind_method(D_METHOD("get_isLooping"), &RJTimeLine::get_isLooping);
|
ClassDB::bind_method( D_METHOD( "set_isLooping", "isLooping" ), &RJTimeLine::set_isLooping );
|
||||||
ClassDB::bind_method(D_METHOD("set_isLooping"), &RJTimeLine::set_isLooping);
|
ClassDB::bind_method( D_METHOD( "get_isLooping"), &RJTimeLine::get_isLooping);
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "isLooping"), "set_isLooping", "get_isLooping");
|
ADD_PROPERTY(PropertyInfo( Variant::BOOL, "isLooping" ), "set_isLooping", "get_isLooping" );
|
||||||
|
|
||||||
/* loopStart: float */
|
// loopStart: float
|
||||||
ClassDB::bind_method(D_METHOD("get_loopStart"), &RJTimeLine::get_loopStart);
|
ClassDB::bind_method( D_METHOD( "set_loopStart", "loopStart" ), &RJTimeLine::set_loopStart );
|
||||||
ClassDB::bind_method(D_METHOD("set_loopStart"), &RJTimeLine::set_loopStart);
|
ClassDB::bind_method( D_METHOD( "get_loopStart"), &RJTimeLine::get_loopStart);
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "loopStart"), "set_loopStart", "get_loopStart");
|
ADD_PROPERTY(PropertyInfo( Variant::FLOAT, "loopStart" ), "set_loopStart", "get_loopStart" );
|
||||||
|
|
||||||
/* loopEnd: float */
|
// loopEnd: float
|
||||||
ClassDB::bind_method(D_METHOD("get_loopEnd"), &RJTimeLine::get_loopEnd);
|
ClassDB::bind_method( D_METHOD( "set_loopEnd", "loopEnd" ), &RJTimeLine::set_loopEnd );
|
||||||
ClassDB::bind_method(D_METHOD("set_loopEnd"), &RJTimeLine::set_loopEnd);
|
ClassDB::bind_method( D_METHOD( "get_loopEnd"), &RJTimeLine::get_loopEnd);
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "loopEnd"), "set_loopEnd", "get_loopEnd");
|
ADD_PROPERTY(PropertyInfo( Variant::FLOAT, "loopEnd" ), "set_loopEnd", "get_loopEnd" );
|
||||||
|
|
||||||
/* startSpeed: float */
|
// startSpeed: float
|
||||||
ClassDB::bind_method(D_METHOD("get_startSpeed"), &RJTimeLine::get_startSpeed);
|
ClassDB::bind_method( D_METHOD( "set_startSpeed", "startSpeed" ), &RJTimeLine::set_startSpeed );
|
||||||
ClassDB::bind_method(D_METHOD("set_startSpeed"), &RJTimeLine::set_startSpeed);
|
ClassDB::bind_method( D_METHOD( "get_startSpeed"), &RJTimeLine::get_startSpeed);
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "startSpeed"), "set_startSpeed", "get_startSpeed");
|
ADD_PROPERTY(PropertyInfo( Variant::FLOAT, "startSpeed" ), "set_startSpeed", "get_startSpeed" );
|
||||||
|
|
||||||
/* autoStart: bool */
|
// autoStart: bool
|
||||||
ClassDB::bind_method(D_METHOD("get_autoStart"), &RJTimeLine::get_autoStart);
|
ClassDB::bind_method( D_METHOD( "set_autoStart", "autoStart" ), &RJTimeLine::set_autoStart );
|
||||||
ClassDB::bind_method(D_METHOD("set_autoStart"), &RJTimeLine::set_autoStart);
|
ClassDB::bind_method( D_METHOD( "get_autoStart"), &RJTimeLine::get_autoStart);
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autoStart"), "set_autoStart", "get_autoStart");
|
ADD_PROPERTY(PropertyInfo( Variant::BOOL, "autoStart" ), "set_autoStart", "get_autoStart" );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Constructor
|
||||||
RJTimeLine::RJTimeLine()
|
RJTimeLine::RJTimeLine()
|
||||||
{
|
{
|
||||||
isLooping = false;
|
isLooping = false;
|
||||||
|
@ -42,29 +43,31 @@ RJTimeLine::RJTimeLine()
|
||||||
autoStart = false;
|
autoStart = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Destructor
|
||||||
RJTimeLine::~RJTimeLine()
|
RJTimeLine::~RJTimeLine()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* isLooping: bool */
|
// isLooping: bool
|
||||||
bool RJTimeLine::get_isLooping() { return isLooping; }
|
bool RJTimeLine::get_isLooping() { return isLooping; }
|
||||||
void RJTimeLine::set_isLooping( bool p_isLooping ) { isLooping = p_isLooping; }
|
void RJTimeLine::set_isLooping( bool p_isLooping ) { isLooping = p_isLooping; }
|
||||||
|
|
||||||
/* loopStart: float */
|
// loopStart: float
|
||||||
float RJTimeLine::get_loopStart() { return loopStart; }
|
float RJTimeLine::get_loopStart() { return loopStart; }
|
||||||
void RJTimeLine::set_loopStart( float p_loopStart ) { loopStart = p_loopStart; }
|
void RJTimeLine::set_loopStart( float p_loopStart ) { loopStart = p_loopStart; }
|
||||||
|
|
||||||
/* loopEnd: float */
|
// loopEnd: float
|
||||||
float RJTimeLine::get_loopEnd() { return loopEnd; }
|
float RJTimeLine::get_loopEnd() { return loopEnd; }
|
||||||
void RJTimeLine::set_loopEnd( float p_loopEnd ) { loopEnd = p_loopEnd; }
|
void RJTimeLine::set_loopEnd( float p_loopEnd ) { loopEnd = p_loopEnd; }
|
||||||
|
|
||||||
/* startSpeed: float */
|
// startSpeed: float
|
||||||
float RJTimeLine::get_startSpeed() { return startSpeed; }
|
float RJTimeLine::get_startSpeed() { return startSpeed; }
|
||||||
void RJTimeLine::set_startSpeed( float p_startSpeed ) { startSpeed = p_startSpeed; }
|
void RJTimeLine::set_startSpeed( float p_startSpeed ) { startSpeed = p_startSpeed; }
|
||||||
|
|
||||||
/* autoStart: bool */
|
// autoStart: bool
|
||||||
bool RJTimeLine::get_autoStart() { return autoStart; }
|
bool RJTimeLine::get_autoStart() { return autoStart; }
|
||||||
void RJTimeLine::set_autoStart( bool p_autoStart ) { autoStart = p_autoStart; }
|
void RJTimeLine::set_autoStart( bool p_autoStart ) { autoStart = p_autoStart; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
30
RJTimeLine.h
30
RJTimeLine.h
|
@ -4,34 +4,58 @@
|
||||||
#ifndef ROKOJORI__TIME_LINE_H
|
#ifndef ROKOJORI__TIME_LINE_H
|
||||||
#define ROKOJORI__TIME_LINE_H
|
#define ROKOJORI__TIME_LINE_H
|
||||||
|
|
||||||
|
#include "./RJGodotHeaders.h"
|
||||||
#include "core/io/resource.h"
|
#include "core/io/resource.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class RJTimeLine : public Resource
|
class RJTimeLine : public Resource
|
||||||
{
|
{
|
||||||
GDCLASS(RJTimeLine, Resource);
|
GDCLASS( RJTimeLine, Resource );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static void _bind_methods();
|
static void _bind_methods();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// isLooping : bool
|
||||||
bool isLooping;
|
bool isLooping;
|
||||||
|
|
||||||
|
// loopStart : float
|
||||||
float loopStart;
|
float loopStart;
|
||||||
|
|
||||||
|
// loopEnd : float
|
||||||
float loopEnd;
|
float loopEnd;
|
||||||
|
|
||||||
|
// startSpeed : float
|
||||||
float startSpeed;
|
float startSpeed;
|
||||||
|
|
||||||
|
// autoStart : bool
|
||||||
bool autoStart;
|
bool autoStart;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
||||||
|
// isLooping : bool
|
||||||
bool get_isLooping(); void set_isLooping( bool p_isLooping );
|
bool get_isLooping(); void set_isLooping( bool p_isLooping );
|
||||||
|
|
||||||
|
// loopStart : float
|
||||||
float get_loopStart(); void set_loopStart( float p_loopStart );
|
float get_loopStart(); void set_loopStart( float p_loopStart );
|
||||||
|
|
||||||
|
// loopEnd : float
|
||||||
float get_loopEnd(); void set_loopEnd( float p_loopEnd );
|
float get_loopEnd(); void set_loopEnd( float p_loopEnd );
|
||||||
|
|
||||||
|
// startSpeed : float
|
||||||
float get_startSpeed(); void set_startSpeed( float p_startSpeed );
|
float get_startSpeed(); void set_startSpeed( float p_startSpeed );
|
||||||
|
|
||||||
|
// autoStart : bool
|
||||||
bool get_autoStart(); void set_autoStart( bool p_autoStart );
|
bool get_autoStart(); void set_autoStart( bool p_autoStart );
|
||||||
|
|
||||||
|
// Constructor
|
||||||
RJTimeLine();
|
RJTimeLine();
|
||||||
|
|
||||||
|
// Destructor
|
||||||
~RJTimeLine();
|
~RJTimeLine();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include "RJTimeLineManager.h"
|
#include "RJTimeLineManager.h"
|
||||||
|
|
||||||
|
// Registers fields, signals and methods for Godot
|
||||||
void RJTimeLineManager::_bind_methods()
|
void RJTimeLineManager::_bind_methods()
|
||||||
{
|
{
|
||||||
GDVIRTUAL_BIND( getTimeLineIndex, "timeLine" );
|
GDVIRTUAL_BIND( getTimeLineIndex, "timeLine" );
|
||||||
|
@ -22,11 +22,13 @@ void RJTimeLineManager::_bind_methods()
|
||||||
ADD_SIGNAL (MethodInfo( "onSpan" , PropertyInfo(Variant::INT, "callbackID"), PropertyInfo(Variant::INT, "spanType")) );
|
ADD_SIGNAL (MethodInfo( "onSpan" , PropertyInfo(Variant::INT, "callbackID"), PropertyInfo(Variant::INT, "spanType")) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Constructor
|
||||||
RJTimeLineManager::RJTimeLineManager()
|
RJTimeLineManager::RJTimeLineManager()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Destructor
|
||||||
RJTimeLineManager::~RJTimeLineManager()
|
RJTimeLineManager::~RJTimeLineManager()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -34,3 +36,4 @@ RJTimeLineManager::~RJTimeLineManager()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,13 +4,16 @@
|
||||||
#ifndef ROKOJORI__TIME_LINE_MANAGER_H
|
#ifndef ROKOJORI__TIME_LINE_MANAGER_H
|
||||||
#define ROKOJORI__TIME_LINE_MANAGER_H
|
#define ROKOJORI__TIME_LINE_MANAGER_H
|
||||||
|
|
||||||
|
#include "./RJGodotHeaders.h"
|
||||||
#include "./RJTimeLine.h"
|
#include "./RJTimeLine.h"
|
||||||
#include "./RJNetworkNode.h"
|
#include "./RJNetworkNode.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class RJTimeLineManager : public RJNetworkNode
|
class RJTimeLineManager : public RJNetworkNode
|
||||||
{
|
{
|
||||||
GDCLASS(RJTimeLineManager, RJNetworkNode);
|
GDCLASS( RJTimeLineManager, RJNetworkNode );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static void _bind_methods();
|
static void _bind_methods();
|
||||||
|
@ -20,23 +23,51 @@ protected:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
||||||
|
// getTimeLineIndex( Ref<RJTimeLine> timeLine ) : int
|
||||||
GDVIRTUAL1R( int, getTimeLineIndex, Ref<RJTimeLine> );
|
GDVIRTUAL1R( int, getTimeLineIndex, Ref<RJTimeLine> );
|
||||||
|
|
||||||
|
// getTimeLineSize() : int
|
||||||
GDVIRTUAL0R( int, getTimeLineSize );
|
GDVIRTUAL0R( int, getTimeLineSize );
|
||||||
|
|
||||||
|
// createID() : int
|
||||||
GDVIRTUAL0R( int, createID );
|
GDVIRTUAL0R( int, createID );
|
||||||
|
|
||||||
|
// getLastPosition( int timeLineIndex ) : double
|
||||||
GDVIRTUAL1R( double, getLastPosition, int );
|
GDVIRTUAL1R( double, getLastPosition, int );
|
||||||
|
|
||||||
|
// getPosition( int timeLineIndex ) : double
|
||||||
GDVIRTUAL1R( double, getPosition, int );
|
GDVIRTUAL1R( double, getPosition, int );
|
||||||
|
|
||||||
|
// setPosition( int timeLineIndex, double position ) : void
|
||||||
GDVIRTUAL2( setPosition, int, double );
|
GDVIRTUAL2( setPosition, int, double );
|
||||||
|
|
||||||
|
// getSpeed( int timeLineIndex ) : double
|
||||||
GDVIRTUAL1R( double, getSpeed, int );
|
GDVIRTUAL1R( double, getSpeed, int );
|
||||||
|
|
||||||
|
// setSpeed( int timeLineIndex, double speed ) : void
|
||||||
GDVIRTUAL2( setSpeed, int, double );
|
GDVIRTUAL2( setSpeed, int, double );
|
||||||
|
|
||||||
|
// getPlayState( int timeLineIndex ) : bool
|
||||||
GDVIRTUAL1R( bool, getPlayState, int );
|
GDVIRTUAL1R( bool, getPlayState, int );
|
||||||
|
|
||||||
|
// setPlayState( int timeLineIndex, bool playState ) : void
|
||||||
GDVIRTUAL2( setPlayState, int, bool );
|
GDVIRTUAL2( setPlayState, int, bool );
|
||||||
|
|
||||||
|
// scheduleEvent( int timeLineIndex, double position, int callbackID, bool isPersistent ) : void
|
||||||
GDVIRTUAL4( scheduleEvent, int, double, int, bool );
|
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 );
|
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();
|
RJTimeLineManager();
|
||||||
|
|
||||||
|
// Destructor
|
||||||
~RJTimeLineManager();
|
~RJTimeLineManager();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -3,17 +3,19 @@
|
||||||
|
|
||||||
#include "RJUpdatable.h"
|
#include "RJUpdatable.h"
|
||||||
|
|
||||||
|
// Registers fields, signals and methods for Godot
|
||||||
void RJUpdatable::_bind_methods()
|
void RJUpdatable::_bind_methods()
|
||||||
{
|
{
|
||||||
GDVIRTUAL_BIND( update, "delta" );
|
GDVIRTUAL_BIND( update, "delta" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Constructor
|
||||||
RJUpdatable::RJUpdatable()
|
RJUpdatable::RJUpdatable()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Destructor
|
||||||
RJUpdatable::~RJUpdatable()
|
RJUpdatable::~RJUpdatable()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -21,3 +23,4 @@ RJUpdatable::~RJUpdatable()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,13 +4,15 @@
|
||||||
#ifndef ROKOJORI__UPDATABLE_H
|
#ifndef ROKOJORI__UPDATABLE_H
|
||||||
#define ROKOJORI__UPDATABLE_H
|
#define ROKOJORI__UPDATABLE_H
|
||||||
|
|
||||||
|
#include "./RJGodotHeaders.h"
|
||||||
#include "./RJNetworkNode.h"
|
#include "./RJNetworkNode.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class RJUpdatable : public RJNetworkNode
|
class RJUpdatable : public RJNetworkNode
|
||||||
{
|
{
|
||||||
GDCLASS(RJUpdatable, RJNetworkNode);
|
GDCLASS( RJUpdatable, RJNetworkNode );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static void _bind_methods();
|
static void _bind_methods();
|
||||||
|
@ -20,10 +22,14 @@ protected:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
||||||
|
// update( double delta ) : void
|
||||||
GDVIRTUAL1( update, double );
|
GDVIRTUAL1( update, double );
|
||||||
|
|
||||||
|
// Constructor
|
||||||
RJUpdatable();
|
RJUpdatable();
|
||||||
|
|
||||||
|
// Destructor
|
||||||
~RJUpdatable();
|
~RJUpdatable();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include "RJVirtualCamera3D.h"
|
#include "RJVirtualCamera3D.h"
|
||||||
|
|
||||||
|
// Registers fields, signals and methods for Godot
|
||||||
void RJVirtualCamera3D::_bind_methods()
|
void RJVirtualCamera3D::_bind_methods()
|
||||||
{
|
{
|
||||||
GDVIRTUAL_BIND( getCameraPosition );
|
GDVIRTUAL_BIND( getCameraPosition );
|
||||||
|
@ -11,11 +11,13 @@ void RJVirtualCamera3D::_bind_methods()
|
||||||
GDVIRTUAL_BIND( getCameraFOV );
|
GDVIRTUAL_BIND( getCameraFOV );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Constructor
|
||||||
RJVirtualCamera3D::RJVirtualCamera3D()
|
RJVirtualCamera3D::RJVirtualCamera3D()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Destructor
|
||||||
RJVirtualCamera3D::~RJVirtualCamera3D()
|
RJVirtualCamera3D::~RJVirtualCamera3D()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -23,3 +25,4 @@ RJVirtualCamera3D::~RJVirtualCamera3D()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,13 +4,15 @@
|
||||||
#ifndef ROKOJORI__VIRTUAL_CAMERA_3_D_H
|
#ifndef ROKOJORI__VIRTUAL_CAMERA_3_D_H
|
||||||
#define ROKOJORI__VIRTUAL_CAMERA_3_D_H
|
#define ROKOJORI__VIRTUAL_CAMERA_3_D_H
|
||||||
|
|
||||||
|
#include "./RJGodotHeaders.h"
|
||||||
#include "scene/3d/node_3d.h"
|
#include "scene/3d/node_3d.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class RJVirtualCamera3D : public Node3D
|
class RJVirtualCamera3D : public Node3D
|
||||||
{
|
{
|
||||||
GDCLASS(RJVirtualCamera3D, Node3D);
|
GDCLASS( RJVirtualCamera3D, Node3D );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static void _bind_methods();
|
static void _bind_methods();
|
||||||
|
@ -20,12 +22,20 @@ protected:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
||||||
|
// getCameraPosition() : Vector3
|
||||||
GDVIRTUAL0R( Vector3, getCameraPosition );
|
GDVIRTUAL0R( Vector3, getCameraPosition );
|
||||||
|
|
||||||
|
// getCameraRotation() : Quaternion
|
||||||
GDVIRTUAL0R( Quaternion, getCameraRotation );
|
GDVIRTUAL0R( Quaternion, getCameraRotation );
|
||||||
|
|
||||||
|
// getCameraFOV() : float
|
||||||
GDVIRTUAL0R( float, getCameraFOV );
|
GDVIRTUAL0R( float, getCameraFOV );
|
||||||
|
|
||||||
|
// Constructor
|
||||||
RJVirtualCamera3D();
|
RJVirtualCamera3D();
|
||||||
|
|
||||||
|
// Destructor
|
||||||
~RJVirtualCamera3D();
|
~RJVirtualCamera3D();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include "RJVirtualCamera3DManager.h"
|
#include "RJVirtualCamera3DManager.h"
|
||||||
|
|
||||||
|
// Registers fields, signals and methods for Godot
|
||||||
void RJVirtualCamera3DManager::_bind_methods()
|
void RJVirtualCamera3DManager::_bind_methods()
|
||||||
{
|
{
|
||||||
GDVIRTUAL_BIND( getCamera, "cameraIndex" );
|
GDVIRTUAL_BIND( getCamera, "cameraIndex" );
|
||||||
|
@ -11,35 +11,38 @@ void RJVirtualCamera3DManager::_bind_methods()
|
||||||
GDVIRTUAL_BIND( getCameraSize );
|
GDVIRTUAL_BIND( getCameraSize );
|
||||||
GDVIRTUAL_BIND( getCameraPriority, "cameraIndex" );
|
GDVIRTUAL_BIND( getCameraPriority, "cameraIndex" );
|
||||||
GDVIRTUAL_BIND( setCameraPriority, "cameraIndex", "priority" );
|
GDVIRTUAL_BIND( setCameraPriority, "cameraIndex", "priority" );
|
||||||
/* cameraPrioritySmoothingCoefficient: float */
|
// cameraPrioritySmoothingCoefficient: float
|
||||||
ClassDB::bind_method(D_METHOD("get_cameraPrioritySmoothingCoefficient"), &RJVirtualCamera3DManager::get_cameraPrioritySmoothingCoefficient);
|
ClassDB::bind_method( D_METHOD( "set_cameraPrioritySmoothingCoefficient", "cameraPrioritySmoothingCoefficient" ), &RJVirtualCamera3DManager::set_cameraPrioritySmoothingCoefficient );
|
||||||
ClassDB::bind_method(D_METHOD("set_cameraPrioritySmoothingCoefficient"), &RJVirtualCamera3DManager::set_cameraPrioritySmoothingCoefficient);
|
ClassDB::bind_method( D_METHOD( "get_cameraPrioritySmoothingCoefficient"), &RJVirtualCamera3DManager::get_cameraPrioritySmoothingCoefficient);
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "cameraPrioritySmoothingCoefficient"), "set_cameraPrioritySmoothingCoefficient", "get_cameraPrioritySmoothingCoefficient");
|
ADD_PROPERTY(PropertyInfo( Variant::FLOAT, "cameraPrioritySmoothingCoefficient" ), "set_cameraPrioritySmoothingCoefficient", "get_cameraPrioritySmoothingCoefficient" );
|
||||||
|
|
||||||
/* cameraPrioritySmoothingStepFPS: float */
|
// cameraPrioritySmoothingStepFPS: float
|
||||||
ClassDB::bind_method(D_METHOD("get_cameraPrioritySmoothingStepFPS"), &RJVirtualCamera3DManager::get_cameraPrioritySmoothingStepFPS);
|
ClassDB::bind_method( D_METHOD( "set_cameraPrioritySmoothingStepFPS", "cameraPrioritySmoothingStepFPS" ), &RJVirtualCamera3DManager::set_cameraPrioritySmoothingStepFPS );
|
||||||
ClassDB::bind_method(D_METHOD("set_cameraPrioritySmoothingStepFPS"), &RJVirtualCamera3DManager::set_cameraPrioritySmoothingStepFPS);
|
ClassDB::bind_method( D_METHOD( "get_cameraPrioritySmoothingStepFPS"), &RJVirtualCamera3DManager::get_cameraPrioritySmoothingStepFPS);
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "cameraPrioritySmoothingStepFPS"), "set_cameraPrioritySmoothingStepFPS", "get_cameraPrioritySmoothingStepFPS");
|
ADD_PROPERTY(PropertyInfo( Variant::FLOAT, "cameraPrioritySmoothingStepFPS" ), "set_cameraPrioritySmoothingStepFPS", "get_cameraPrioritySmoothingStepFPS" );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Constructor
|
||||||
RJVirtualCamera3DManager::RJVirtualCamera3DManager()
|
RJVirtualCamera3DManager::RJVirtualCamera3DManager()
|
||||||
{
|
{
|
||||||
cameraPrioritySmoothingCoefficient = 0.5;
|
cameraPrioritySmoothingCoefficient = 0.5;
|
||||||
cameraPrioritySmoothingStepFPS = 120;
|
cameraPrioritySmoothingStepFPS = 120;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Destructor
|
||||||
RJVirtualCamera3DManager::~RJVirtualCamera3DManager()
|
RJVirtualCamera3DManager::~RJVirtualCamera3DManager()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* cameraPrioritySmoothingCoefficient: float */
|
// cameraPrioritySmoothingCoefficient: float
|
||||||
float RJVirtualCamera3DManager::get_cameraPrioritySmoothingCoefficient() { return cameraPrioritySmoothingCoefficient; }
|
float RJVirtualCamera3DManager::get_cameraPrioritySmoothingCoefficient() { return cameraPrioritySmoothingCoefficient; }
|
||||||
void RJVirtualCamera3DManager::set_cameraPrioritySmoothingCoefficient( float p_cameraPrioritySmoothingCoefficient ) { cameraPrioritySmoothingCoefficient = p_cameraPrioritySmoothingCoefficient; }
|
void RJVirtualCamera3DManager::set_cameraPrioritySmoothingCoefficient( float p_cameraPrioritySmoothingCoefficient ) { cameraPrioritySmoothingCoefficient = p_cameraPrioritySmoothingCoefficient; }
|
||||||
|
|
||||||
/* cameraPrioritySmoothingStepFPS: float */
|
// cameraPrioritySmoothingStepFPS: float
|
||||||
float RJVirtualCamera3DManager::get_cameraPrioritySmoothingStepFPS() { return cameraPrioritySmoothingStepFPS; }
|
float RJVirtualCamera3DManager::get_cameraPrioritySmoothingStepFPS() { return cameraPrioritySmoothingStepFPS; }
|
||||||
void RJVirtualCamera3DManager::set_cameraPrioritySmoothingStepFPS( float p_cameraPrioritySmoothingStepFPS ) { cameraPrioritySmoothingStepFPS = p_cameraPrioritySmoothingStepFPS; }
|
void RJVirtualCamera3DManager::set_cameraPrioritySmoothingStepFPS( float p_cameraPrioritySmoothingStepFPS ) { cameraPrioritySmoothingStepFPS = p_cameraPrioritySmoothingStepFPS; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,33 +4,56 @@
|
||||||
#ifndef ROKOJORI__VIRTUAL_CAMERA_3_D_MANAGER_H
|
#ifndef ROKOJORI__VIRTUAL_CAMERA_3_D_MANAGER_H
|
||||||
#define ROKOJORI__VIRTUAL_CAMERA_3_D_MANAGER_H
|
#define ROKOJORI__VIRTUAL_CAMERA_3_D_MANAGER_H
|
||||||
|
|
||||||
|
#include "./RJGodotHeaders.h"
|
||||||
#include "./RJVirtualCamera3D.h"
|
#include "./RJVirtualCamera3D.h"
|
||||||
#include "./RJNetworkNode.h"
|
#include "./RJNetworkNode.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class RJVirtualCamera3DManager : public RJNetworkNode
|
class RJVirtualCamera3DManager : public RJNetworkNode
|
||||||
{
|
{
|
||||||
GDCLASS(RJVirtualCamera3DManager, RJNetworkNode);
|
GDCLASS( RJVirtualCamera3DManager, RJNetworkNode );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static void _bind_methods();
|
static void _bind_methods();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// cameraPrioritySmoothingCoefficient : float
|
||||||
float cameraPrioritySmoothingCoefficient;
|
float cameraPrioritySmoothingCoefficient;
|
||||||
|
|
||||||
|
// cameraPrioritySmoothingStepFPS : float
|
||||||
float cameraPrioritySmoothingStepFPS;
|
float cameraPrioritySmoothingStepFPS;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
||||||
|
// getCamera( int cameraIndex ) : Ref<RJVirtualCamera3D>
|
||||||
GDVIRTUAL1R( Ref<RJVirtualCamera3D>, getCamera, int );
|
GDVIRTUAL1R( Ref<RJVirtualCamera3D>, getCamera, int );
|
||||||
|
|
||||||
|
// getCameraIndex( Ref<RJVirtualCamera3D> timeLine ) : int
|
||||||
GDVIRTUAL1R( int, getCameraIndex, Ref<RJVirtualCamera3D> );
|
GDVIRTUAL1R( int, getCameraIndex, Ref<RJVirtualCamera3D> );
|
||||||
|
|
||||||
|
// getCameraSize() : int
|
||||||
GDVIRTUAL0R( int, getCameraSize );
|
GDVIRTUAL0R( int, getCameraSize );
|
||||||
|
|
||||||
|
// getCameraPriority( int cameraIndex ) : float
|
||||||
GDVIRTUAL1R( float, getCameraPriority, int );
|
GDVIRTUAL1R( float, getCameraPriority, int );
|
||||||
|
|
||||||
|
// setCameraPriority( int cameraIndex, float priority ) : void
|
||||||
GDVIRTUAL2( setCameraPriority, int, float );
|
GDVIRTUAL2( setCameraPriority, int, float );
|
||||||
|
|
||||||
|
// cameraPrioritySmoothingCoefficient : float
|
||||||
float get_cameraPrioritySmoothingCoefficient(); void set_cameraPrioritySmoothingCoefficient( float p_cameraPrioritySmoothingCoefficient );
|
float get_cameraPrioritySmoothingCoefficient(); void set_cameraPrioritySmoothingCoefficient( float p_cameraPrioritySmoothingCoefficient );
|
||||||
|
|
||||||
|
// cameraPrioritySmoothingStepFPS : float
|
||||||
float get_cameraPrioritySmoothingStepFPS(); void set_cameraPrioritySmoothingStepFPS( float p_cameraPrioritySmoothingStepFPS );
|
float get_cameraPrioritySmoothingStepFPS(); void set_cameraPrioritySmoothingStepFPS( float p_cameraPrioritySmoothingStepFPS );
|
||||||
|
|
||||||
|
// Constructor
|
||||||
RJVirtualCamera3DManager();
|
RJVirtualCamera3DManager();
|
||||||
|
|
||||||
|
// Destructor
|
||||||
~RJVirtualCamera3DManager();
|
~RJVirtualCamera3DManager();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -4,20 +4,20 @@
|
||||||
|
|
||||||
#include "core/object/class_db.h"
|
#include "core/object/class_db.h"
|
||||||
|
|
||||||
#include "./RJNetworkNode.h"
|
|
||||||
#include "./RJAction.h"
|
#include "./RJAction.h"
|
||||||
|
#include "./RJCaster.h"
|
||||||
|
#include "./RJIntProperty.h"
|
||||||
|
#include "./RJNetworkNode.h"
|
||||||
|
#include "./RJPointable.h"
|
||||||
|
#include "./RJPointer.h"
|
||||||
#include "./RJSelector.h"
|
#include "./RJSelector.h"
|
||||||
#include "./RJSensor.h"
|
#include "./RJSensor.h"
|
||||||
#include "./RJSequenceAction.h"
|
#include "./RJSequenceAction.h"
|
||||||
#include "./RJUpdatable.h"
|
|
||||||
#include "./RJTimeLine.h"
|
#include "./RJTimeLine.h"
|
||||||
#include "./RJTimeLineManager.h"
|
#include "./RJTimeLineManager.h"
|
||||||
|
#include "./RJUpdatable.h"
|
||||||
#include "./RJVirtualCamera3D.h"
|
#include "./RJVirtualCamera3D.h"
|
||||||
#include "./RJVirtualCamera3DManager.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 )
|
void initialize_rokojori_action_library_module( ModuleInitializationLevel p_level )
|
||||||
{
|
{
|
||||||
|
@ -26,20 +26,20 @@ void initialize_rokojori_action_library_module( ModuleInitializationLevel p_leve
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ClassDB::register_class<RJNetworkNode>();
|
|
||||||
ClassDB::register_class<RJAction>();
|
ClassDB::register_class<RJAction>();
|
||||||
|
ClassDB::register_class<RJCaster>();
|
||||||
|
ClassDB::register_class<RJIntProperty>();
|
||||||
|
ClassDB::register_class<RJNetworkNode>();
|
||||||
|
ClassDB::register_class<RJPointable>();
|
||||||
|
ClassDB::register_class<RJPointer>();
|
||||||
ClassDB::register_class<RJSelector>();
|
ClassDB::register_class<RJSelector>();
|
||||||
ClassDB::register_class<RJSensor>();
|
ClassDB::register_class<RJSensor>();
|
||||||
ClassDB::register_class<RJSequenceAction>();
|
ClassDB::register_class<RJSequenceAction>();
|
||||||
ClassDB::register_class<RJUpdatable>();
|
|
||||||
ClassDB::register_class<RJTimeLine>();
|
ClassDB::register_class<RJTimeLine>();
|
||||||
ClassDB::register_class<RJTimeLineManager>();
|
ClassDB::register_class<RJTimeLineManager>();
|
||||||
|
ClassDB::register_class<RJUpdatable>();
|
||||||
ClassDB::register_class<RJVirtualCamera3D>();
|
ClassDB::register_class<RJVirtualCamera3D>();
|
||||||
ClassDB::register_class<RJVirtualCamera3DManager>();
|
ClassDB::register_class<RJVirtualCamera3DManager>();
|
||||||
ClassDB::register_class<RJBoolProperty>();
|
|
||||||
ClassDB::register_class<RJNodeProperty>();
|
|
||||||
ClassDB::register_class<RJNumberProperty>();
|
|
||||||
ClassDB::register_class<RJStringProperty>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void uninitialize_rokojori_action_library_module( ModuleInitializationLevel p_level )
|
void uninitialize_rokojori_action_library_module( ModuleInitializationLevel p_level )
|
||||||
|
|
Loading…
Reference in New Issue