CSCI 3081 - Drone Delivery System
Public Member Functions | List of all members
csci3081::DroneFactory Class Reference

This is the DroneFactory, responsible for making Drone object. More...

#include <drone_factory.h>

Inheritance diagram for csci3081::DroneFactory:
Inheritance graph

Public Member Functions

IEntityCreateEntity (const picojson::object &val)
 This is an inheritance function from IEntityFactory to create an approxiate Entity object based on the argument pass in Given the picojson::object val, this should create an entity. Based on the type of entity, there may be different fields. You can see the vals that will be passed in the project/web/scenes directory. Some of the fields are for our backend system and you don't need to worry about them. (for instance, mesh, rotation, offset, etc.) More...
 

Detailed Description

This is the DroneFactory, responsible for making Drone object.

Member Function Documentation

◆ CreateEntity()

IEntity * csci3081::DroneFactory::CreateEntity ( const picojson::object &  val)
virtual

This is an inheritance function from IEntityFactory to create an approxiate Entity object based on the argument pass in Given the picojson::object val, this should create an entity. Based on the type of entity, there may be different fields. You can see the vals that will be passed in the project/web/scenes directory. Some of the fields are for our backend system and you don't need to worry about them. (for instance, mesh, rotation, offset, etc.)

Some fields in val that you will need to create the entity correctly:

type: string (could be "drone/customer/package")

name: string

position: array (contains [x_position, y_position, z_position])

direction: array (contains [x, y, z])

speed: float

battery_capacity: float

Parameters
[in]valthe picojson::object that constains all of the necessary information above in a json format
Returns
IEntity pointer if the object has type "drone"; NULL otherwise

Implements entity_project::IEntityFactory.


The documentation for this class was generated from the following files: