Pioneer
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Projectile Class Reference

#include <Projectile.h>

Inheritance diagram for Projectile:
Inheritance graph
[legend]
Collaboration diagram for Projectile:
Collaboration graph
[legend]

Public Member Functions

 OBJDEF (Projectile, Body, PROJECTILE)
 
 Projectile ()=delete
 
 Projectile (Body *parent, const ProjectileData &prData, const vector3d &pos, const vector3d &baseVel, const vector3d &dirVel)
 
 Projectile (const Json &jsonObj, Space *space)
 
virtual ~Projectile ()
 
virtual void Render (Graphics::Renderer *r, const Camera *camera, const vector3d &viewCoords, const matrix4x4d &viewTransform) override final
 
void TimeStepUpdate (const float timeStep) override final
 
void StaticUpdate (const float timeStep) override final
 
virtual void NotifyRemoved (const Body *const removedBody) override final
 
virtual void UpdateInterpTransform (double alpha) override final
 
virtual void PostLoadFixup (Space *space) override final
 
- Public Member Functions inherited from Body
virtual ObjectType GetType () const
 
virtual bool IsType (ObjectType c) const
 
 Body ()
 
 Body (const Json &jsonObj, Space *space)
 
virtual ~Body ()
 
void ToJson (Json &jsonObj, Space *space)
 
virtual void PostLoadFixup (Space *space)
 
virtual void SetPosition (const vector3d &p)
 
vector3d GetPosition () const
 
virtual void SetOrient (const matrix3x3d &r)
 
const matrix3x3d & GetOrient () const
 
virtual void SetVelocity (const vector3d &v)
 
virtual vector3d GetVelocity () const
 
virtual void SetAngVelocity (const vector3d &v)
 
virtual vector3d GetAngVelocity () const
 
void SetPhysRadius (double r)
 
double GetPhysRadius () const
 
void SetClipRadius (double r)
 
double GetClipRadius () const
 
virtual double GetMass () const
 
virtual bool OnCollision (Body *o, Uint32 flags, double relVel)
 
virtual bool OnDamage (Body *attacker, float kgDamage, const CollisionContact &contactData)
 
virtual void NotifyRemoved (const Body *const removedBody)
 
virtual void StaticUpdate (const float timeStep)
 
virtual void TimeStepUpdate (const float timeStep)
 
virtual void Render (Graphics::Renderer *r, const Camera *camera, const vector3d &viewCoords, const matrix4x4d &viewTransform)=0
 
virtual void SetFrame (FrameId f)
 
FrameId GetFrame () const
 
void SwitchToFrame (FrameId newFrame)
 
void UpdateFrame ()
 
vector3d GetVelocityRelTo (const Body *) const
 
vector3d GetVelocityRelTo (FrameId) const
 
vector3d GetPositionRelTo (FrameId) const
 
vector3d GetPositionRelTo (const Body *) const
 
matrix3x3d GetOrientRelTo (FrameId) const
 
virtual const SystemBody * GetSystemBody () const
 
void OrientOnSurface (double radius, double latitude, double longitude)
 
virtual void SetLabel (const std::string &label)
 
const std::string & GetLabel () const
 
unsigned int GetFlags () const
 
void SetFlag (unsigned int flag, bool enable)
 
template<typename T >
bool HasComponent () const
 
template<typename T >
T * GetComponent () const
 
template<typename T >
T * AddComponent ()
 
uint64_t GetComponentList () const
 
void MarkDead ()
 
bool IsDead () const
 
virtual bool IsInSpace () const
 
const matrix3x3d & GetInterpOrient () const
 
vector3d GetInterpPosition () const
 
vector3d GetInterpPositionRelTo (FrameId relToId) const
 
vector3d GetInterpPositionRelTo (const Body *relTo) const
 
matrix3x3d GetInterpOrientRelTo (FrameId relToId) const
 
virtual void UpdateInterpTransform (double alpha)
 
virtual vector3d GetTargetIndicatorPosition () const
 
- Public Member Functions inherited from DeleteEmitter
 DeleteEmitter ()
 
virtual ~DeleteEmitter ()
 
- Public Member Functions inherited from LuaWrappable
virtual ~LuaWrappable ()
 
- Public Member Functions inherited from PropertiedObject
PropertyMap & Properties ()
 
const PropertyMap & Properties () const
 

Static Public Member Functions

static void Add (Body *parent, float lifespan, float dam, float length, float width, bool mining, const Color &color, const vector3d &pos, const vector3d &baseVel, const vector3d &dirVel)
 
static void Add (Body *parent, const ProjectileData &prData, const vector3d &pos, const vector3d &baseVel, const vector3d &dirVel)
 
static void FreeModel ()
 
- Static Public Member Functions inherited from Body
static constexpr ObjectType StaticType ()
 
static Body * FromJson (const Json &jsonObj, Space *space)
 

Protected Member Functions

virtual void SaveToJson (Json &jsonObj, Space *space) override final
 
virtual void SaveToJson (Json &jsonObj, Space *space)
 

Additional Inherited Members

- Public Types inherited from Body
enum  { FLAG_CAN_MOVE_FRAME = (1 << 0) , FLAG_LABEL_HIDDEN = (1 << 1) , FLAG_DRAW_LAST = (1 << 2) , FLAG_DRAW_EXCLUDE = (1 << 3) }
 
- Public Attributes inherited from DeleteEmitter
sigc::signal< void > onDelete
 
- Protected Attributes inherited from Body
unsigned int m_flags = 0
 
vector3d m_interpPos
 
matrix3x3d m_interpOrient
 

Constructor & Destructor Documentation

◆ Projectile() [1/3]

Projectile::Projectile ( )
delete

◆ Projectile() [2/3]

Projectile::Projectile ( Body *  parent,
const ProjectileData &  prData,
const vector3d &  pos,
const vector3d &  baseVel,
const vector3d &  dirVel 
)
Here is the call graph for this function:

◆ Projectile() [3/3]

Projectile::Projectile ( const Json &  jsonObj,
Space *  space 
)

◆ ~Projectile()

Projectile::~Projectile ( )
virtual

Member Function Documentation

◆ Add() [1/2]

void Projectile::Add ( Body *  parent,
const ProjectileData &  prData,
const vector3d &  pos,
const vector3d &  baseVel,
const vector3d &  dirVel 
)
static
Here is the call graph for this function:

◆ Add() [2/2]

void Projectile::Add ( Body *  parent,
float  lifespan,
float  dam,
float  length,
float  width,
bool  mining,
const Color &  color,
const vector3d &  pos,
const vector3d &  baseVel,
const vector3d &  dirVel 
)
static
Here is the call graph for this function:

◆ FreeModel()

void Projectile::FreeModel ( )
static

◆ NotifyRemoved()

void Projectile::NotifyRemoved ( const Body *const  removedBody)
finaloverridevirtual

Reimplemented from Body.

◆ OBJDEF()

Projectile::OBJDEF ( Projectile  ,
Body  ,
PROJECTILE   
)

◆ PostLoadFixup()

void Projectile::PostLoadFixup ( Space *  space)
finaloverridevirtual

Reimplemented from Body.

Here is the call graph for this function:

◆ Render()

void Projectile::Render ( Graphics::Renderer *  r,
const Camera *  camera,
const vector3d &  viewCoords,
const matrix4x4d &  viewTransform 
)
finaloverridevirtual

Implements Body.

Here is the call graph for this function:

◆ SaveToJson()

void Projectile::SaveToJson ( Json &  jsonObj,
Space *  space 
)
finaloverrideprotectedvirtual

Reimplemented from Body.

Here is the call graph for this function:

◆ StaticUpdate()

void Projectile::StaticUpdate ( const float  timeStep)
finaloverridevirtual

Reimplemented from Body.

Here is the call graph for this function:

◆ TimeStepUpdate()

void Projectile::TimeStepUpdate ( const float  timeStep)
finaloverridevirtual

Reimplemented from Body.

Here is the call graph for this function:

◆ UpdateInterpTransform()

void Projectile::UpdateInterpTransform ( double  alpha)
finaloverridevirtual

Reimplemented from Body.

Here is the call graph for this function:

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