iFun Engine API  1.0.0-b6053
Great Technology for Great Games
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
fun::World Class Reference
Inheritance diagram for fun::World:

Classes

struct  FindOption
 
class  Object
 
struct  Point
 
struct  Sphere
 
struct  Vector2
 

Public Types

typedef std::vector< float > DistanceVector
 
typedef function< bool(const Point &, float, const Ptr< Object > &)> FindFilter
 
typedef function< bool(const Ptr< World::Object > &object)> ObjectFilter
 
typedef std::vector< Ptr< Object > > ObjectVector
 
typedef std::vector< Ptr< Session > > SessionVector
 
typedef function< void(int64_t type, bool exist)> TypeExistenceCallback
 

Public Member Functions

void Broadcast (const Point &coordinates, float distance, const string &message_type, const Json &message, Encryption encryption, TransportProtocol protocol, const FindOption &option=kDefaultOption, const FindFilter &filter=kNullFilter) ASSERT_NO_ROLLBACK
 
void Broadcast (const Point &coordinates, float distance, const string &message_type, const Ptr< FunMessage > &message, Encryption encryption, TransportProtocol protocol, const FindOption &option=kDefaultOption, const FindFilter &filter=kNullFilter) ASSERT_NO_ROLLBACK
 
void Broadcast (const Point &coordinates, float distance, int32_t message_type, const Ptr< FunMessage > &message, Encryption encryption, TransportProtocol protocol, const FindOption &option=kDefaultOption, const FindFilter &filter=kNullFilter) ASSERT_NO_ROLLBACK
 
void Broadcast (const Point &coordinates, float distance, const ProtobufExtensionIdentifier &message_type, const Ptr< FunMessage > &message, Encryption encryption, TransportProtocol protocol, const FindOption &option=kDefaultOption, const FindFilter &filter=kNullFilter) ASSERT_NO_ROLLBACK
 
void Broadcast (int64_t id, float distance, const string &message_type, const Json &message, Encryption encryption, TransportProtocol protocol, const FindOption &option=kDefaultOption, const FindFilter &filter=kNullFilter) ASSERT_NO_ROLLBACK
 
void Broadcast (int64_t id, float distance, const string &message_type, const Ptr< FunMessage > &message, Encryption encryption, TransportProtocol protocol, const FindOption &option=kDefaultOption, const FindFilter &filter=kNullFilter) ASSERT_NO_ROLLBACK
 
void Broadcast (int64_t id, float distance, int32_t message_type, const Ptr< FunMessage > &message, Encryption encryption, TransportProtocol protocol, const FindOption &option=kDefaultOption, const FindFilter &filter=kNullFilter) ASSERT_NO_ROLLBACK
 
void Broadcast (int64_t id, float distance, const ProtobufExtensionIdentifier &message_type, const Ptr< FunMessage > &message, Encryption encryption, TransportProtocol protocol, const FindOption &option=kDefaultOption, const FindFilter &filter=kNullFilter) ASSERT_NO_ROLLBACK
 
void Broadcast (const string &message_type, const Json &message, Encryption encryption, TransportProtocol protocol) ASSERT_NO_ROLLBACK
 
void Broadcast (const string &message_type, const Ptr< FunMessage > &message, Encryption encryption, TransportProtocol protocol) ASSERT_NO_ROLLBACK
 
void Broadcast (int32_t message_type, const Ptr< FunMessage > &message, Encryption encryption, TransportProtocol protocol) ASSERT_NO_ROLLBACK
 
void Broadcast (const ProtobufExtensionIdentifier &message_type, const Ptr< FunMessage > &message, Encryption encryption, TransportProtocol protocol) ASSERT_NO_ROLLBACK
 
 DECLARE_CLASS_PTR (World)
 
size_t EraseAllObjects (ObjectVector *objects=NULL) ASSERT_NO_ROLLBACK
 
Ptr< ObjectEraseObject (int64_t id) ASSERT_NO_ROLLBACK
 
void FindObject (const Point &coordinates, float distance, ObjectVector *objects)
 
void FindObject (const Point &coordinates, float distance, const FindOption &option, ObjectVector *objects, DistanceVector *distances=NULL)
 
void FindObject (const Point &coordinates, float distance, const FindOption &option, const FindFilter &filter, ObjectVector *objects, DistanceVector *distances=NULL)
 
void FindObject (int64_t id, float distance, ObjectVector *objects)
 
void FindObject (int64_t id, float distance, const FindOption &option, ObjectVector *objects, DistanceVector *distances=NULL)
 
void FindObject (int64_t id, float distance, const FindOption &option, const FindFilter &filter, ObjectVector *objects, DistanceVector *distances=NULL)
 
void FindSession (const Point &coordinates, float distance, SessionVector *out)
 
void FindSession (const Point &coordinates, float distance, const FindOption &option, SessionVector *out)
 
void FindSession (const Point &coordinates, float distance, const FindOption &option, const FindFilter &filter, SessionVector *out)
 
void FindSession (int64_t id, float distance, SessionVector *out)
 
void FindSession (int64_t id, float distance, const FindOption &option, SessionVector *out)
 
void FindSession (int64_t id, float distance, const FindOption &option, const FindFilter &filter, SessionVector *out)
 
void FindStaticObject (int64_t id, const FindOption &option, const FindFilter &filter, ObjectVector *objects, DistanceVector *distances=NULL)
 
void FindStaticObject (const Point &coordinates, const FindOption &option, const FindFilter &filter, ObjectVector *objects, DistanceVector *distances=NULL)
 
void GetAllObjects (const ObjectFilter &filter, ObjectVector *objects) const
 
void GetAllObjects (ObjectVector *objects) const
 
const stringGetName () const
 
Ptr< ObjectGetObject (int64_t id) const
 
size_t GetObjectCount () const
 
int64_t InsertObject (const Point &coordinates, const Ptr< Object > &object) ASSERT_NO_ROLLBACK
 
void InsertStaticObject (const Point &coordinates, const Ptr< Object > &object)
 
bool IsDeleted () const
 
void MonitorTypeExistence (int64_t type, const TypeExistenceCallback &callback)
 
bool MoveObject (int64_t id, const Point &coordinates_delta, Point *new_coordinates=NULL) ASSERT_NO_ROLLBACK
 
bool MoveObjectTo (int64_t id, const Point &coordinate) ASSERT_NO_ROLLBACK
 
void SetSingleThreadMode ()
 

Static Public Member Functions

static FindFilter MakeCircularSectorFilter (float front_gap, const Vector2 &direction, float radius, float left_angle_in_degree, float right_angle_in_degree, float height, bool is_sphere=false, int64_t type_mask=0)
 
static FindFilter MakeFilter (int64_t type_mask)
 
static FindFilter MakeMovingSightFilter (const Sphere &previous_coordinates, int64_t type_mask=0)
 
static FindFilter MakeRectangleFilter (float front_gap, const Vector2 &direction, float width, float depth, float height, bool is_sphere=false, int64_t type_mask=0)
 

Static Public Attributes

static const FindOption kDefaultOption
 
static const int64_t kInvalidId
 
static const FindFilter kNullFilter