april  1.0.0
...
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
april::Gui::AGui3D Class Reference

An Actor with 3D position. More...

#include <agui3d.h>

+ Inheritance diagram for april::Gui::AGui3D:

Public Member Functions

 AGui3D (World *w)
 constructor;
- Public Member Functions inherited from april::Gui::AGui2D
 AGui2D (World *w)
 constructor;
- Public Member Functions inherited from april::Gui::AGui
 AGui (World *w)
 constructor;
- Public Member Functions inherited from april::Actor
 Actor (World *w)
 constructor; creates an invalid actor that needs further initialisation
virtual bool save (QSettings &s) const
 save to a QSettings object
virtual bool load (QSettings &s)
 load from a QSettings object
virtual ID identificator (void) const
 associated ID, if any
virtual Factoryfactory (void) const
 associated factory, if any
SensorfirstSensor (void) const
 first sensor in internal list
ActuatorfirstActuator (void) const
 first actuator in internal list
ReflexfirstReflex (void) const
 first reflex in internal list
BrainfirstBrain (void) const
 first brain in internal list
SensorfindSensor (ID id) const
 first sensor in internal list
ActuatorfindActuator (ID id) const
 first actuator in internal list
ReflexfindReflex (ID id) const
 first reflex in internal list
BrainfindBrain (ID id) const
 first brain in internal list
Worldworld (void) const
 the world where we belong
ID kind (void) const
 tell the kind
QString kindName (void) const
 get the name of the kind (shortcut for UniqueId::name() )
const DNAdna (void) const
 the DNA of this actor
quint64 birth (void) const
 tell the date of birth
quint64 death (void) const
 tell the date of death
quint64 age (void) const
 tell the age of this actor
quint64 toLive (void) const
 tell the life span of this actor
quint64 energy (void) const
 own energy reserve
quint64 totalEnergy (void) const
 total energy packed in this agent (the agent itself and the compoenets)
quint64 cost (void) const
 energy cost
bool isAlive (void) const
 alive or dead
bool dies (void) const
 tell if this is the moment when the agent dies
- Public Member Functions inherited from april::Component
 Component (void)
 constructor;
Amorph & payload (void)
 associated data
- Public Member Functions inherited from ABOX2D
void reset (void)
 bring the internal variables to their ground state
bool operator== (const ABOX2D &other) const
 compares two rectangles
bool operator!= (const ABOX2D &other) const
 compares two points (their coorsinates)
void operator+= (const ABOX2D &other)
 computes the bounding rectangle for the two input boxes
void operator-= (const ABOX2D &other)
 computes the rectangle that is common to the two input boxes
COORDV width (void) const
 width (side on the x axis)
COORDV height (void) const
 height (side on the y axis)
bool isDegenerate (void) const
 tell if this box is degenerate or not
COORDV diagonal (void) const
 lenght of diagonal
void unite (const ABOX2D &first, const ABOX2D &second)
 set this rectangle to the union of two rectangles
void unite (const ABOX2D &other)
 set this rectangle to the union of this and other rectangle
bool contains (const P2D &other) const
 tell if the box contains a point
bool contains (const ABOX2D &other) const
 tell if the box contains another box
bool intersect (const ABOX2D &first, const ABOX2D &second)
 set this rectangle to the intersection of two rectangles
bool intersect (const ABOX2D &other)
 set this rectangle to the intersection of this and other rectangle
bool isNormalised (void) const
 tell if the rectangle is normalised (x1<x2, y1<y2)
void normalise (void)
 normalise the rectangle (x1<x2, y1<y2)
void offset (COORDV dist)
 extend or contract this box by given ammount
void offset (COORDV dist, ABOX2D &out) const
 extend or contract the box by given ammount
void translate (COORDV dx, COORDV dy)
 move the item by this ammount relative to current position
bool visibleIn (const ABOX2D &other) const
 tell if the segment is "visible" inside given shape
COORDV area (void)
 the area of this thing
void center (P2D &c)
 the center point of this one
- Public Member Functions inherited from ABOX3D
 ABOX3D (void)
 constructor;

Protected Member Functions

virtual ~AGui3D (void)
 destructor;
- Protected Member Functions inherited from april::Gui::AGui2D
virtual ~AGui2D (void)
 destructor;
- Protected Member Functions inherited from april::Gui::AGui
virtual ~AGui (void)
 destructor;
- Protected Member Functions inherited from april::Actor
virtual ~Actor (void)
 destructor;
void killMe (void)
 kill the actor; both the actor and the world use this method
void setDNA (const DNA &src)
 set the DNA to provided sequence (intended for ActorFactory)
bool decodeDNA (void)
 load the components of the actor from the DNA
bool addActuator (Actuator *act)
 add an Actuator
bool addSensor (Sensor *act)
 add a Sensor
bool addReflex (Reflex *act)
 add a Reflex
bool addBrain (Brain *act)
 add a Brain
bool remActuator (Actuator *act)
 remove an Actuator
bool remSensor (Sensor *act)
 remove a Sensor
bool remReflex (Reflex *act)
 remove a Reflex
bool remBrain (Brain *act)
 remove a Brain
void doSteps (int steps=1)
 perform steps (called by the World)
void makeAlive (void)
 make the actor alive
void setEnergy (quint64 new_val)
 set total energy (used by the world to initialise and terminate actor)
- Protected Member Functions inherited from april::Component
virtual ~Component (void)
 destructor;
virtual void inserted (void)
 the instance is informed that the parent attached it

Additional Inherited Members

- Static Public Member Functions inherited from april::Actor
static Q_REQUIRED_RESULT ActorfromStg (World *w, QSettings &s)
 constructor method; creates and loads an actor from QSettings
- Public Attributes inherited from ABOX2D
union {
   COORDV   pts_ [4]
 coordinates in an array of 4 values: left, bottom, right, top
   struct {
      COORDV   left_
 X1 component.
      COORDV   bottom_
 Y1 component.
      COORDV   right_
 X2 component.
      COORDV   top_
 Y2 component.
   } 
   struct {
      P2D   bottom_left_
 first point
      P2D   top_right_
 second point
   } 
}; 
- Public Attributes inherited from ABOX3D
ABOX2D box2d_
 top rectangle
COORDV depth_
 depth

Detailed Description

An Actor with 3D position.


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