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

#include <ModelBody.h>

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

Public Member Functions

 OBJDEF (ModelBody, Body, MODELBODY)
 
 ModelBody ()
 
 ModelBody (const Json &jsonObj, Space *space)
 
virtual ~ModelBody ()
 
void SetPosition (const vector3d &p) override
 
void SetOrient (const matrix3x3d &r) override
 
virtual void SetFrame (FrameId fId) override
 
void SetColliding (bool colliding)
 
bool IsColliding () const
 
void SetStatic (bool isStatic)
 
bool IsStatic () const
 
const AabbGetAabb () const
 
SceneGraph::ModelGetModel () const
 
CollMeshGetCollMesh ()
 
GeomGetGeom () const
 
void SetModel (const char *modelName)
 
void RenderModel (Graphics::Renderer *r, const Camera *camera, const vector3d &viewCoords, const matrix4x4d &viewTransform, const bool setLighting=true)
 
virtual void TimeStepUpdate (const float timeStep) override
 
- 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 matrix3x3dGetOrient () 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 SystemBodyGetSystemBody () 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 matrix3x3dGetInterpOrient () 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
PropertyMapProperties ()
 
const PropertyMapProperties () const
 

Protected Member Functions

virtual void SaveToJson (Json &jsonObj, Space *space) override
 
void SetLighting (Graphics::Renderer *r, const Camera *camera, std::vector< float > &oldIntensity, Color &oldAmbient)
 
void ResetLighting (Graphics::Renderer *r, const std::vector< float > &oldIntensity, const Color &oldAmbient)
 
ShieldsGetShields () const
 
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) }
 
- Static Public Member Functions inherited from Body
static constexpr ObjectType StaticType ()
 
static BodyFromJson (const Json &jsonObj, Space *space)
 
- 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

◆ ModelBody() [1/2]

ModelBody::ModelBody ( )

◆ ModelBody() [2/2]

ModelBody::ModelBody ( const Json jsonObj,
Space space 
)
Here is the call graph for this function:

◆ ~ModelBody()

ModelBody::~ModelBody ( )
virtual
Here is the call graph for this function:

Member Function Documentation

◆ GetAabb()

const Aabb & ModelBody::GetAabb ( ) const
inline

◆ GetCollMesh()

CollMesh * ModelBody::GetCollMesh ( )
inline
Here is the call graph for this function:

◆ GetGeom()

Geom * ModelBody::GetGeom ( ) const
inline

◆ GetModel()

SceneGraph::Model * ModelBody::GetModel ( ) const
inline

◆ GetShields()

Shields * ModelBody::GetShields ( ) const
inlineprotected

◆ IsColliding()

bool ModelBody::IsColliding ( ) const
inline

◆ IsStatic()

bool ModelBody::IsStatic ( ) const
inline

◆ OBJDEF()

ModelBody::OBJDEF ( ModelBody  ,
Body  ,
MODELBODY   
)

◆ RenderModel()

void ModelBody::RenderModel ( Graphics::Renderer r,
const Camera camera,
const vector3d viewCoords,
const matrix4x4d viewTransform,
const bool  setLighting = true 
)
Here is the call graph for this function:

◆ ResetLighting()

void ModelBody::ResetLighting ( Graphics::Renderer r,
const std::vector< float > &  oldIntensity,
const Color oldAmbient 
)
protected
Here is the call graph for this function:

◆ SaveToJson()

void ModelBody::SaveToJson ( Json jsonObj,
Space space 
)
overrideprotectedvirtual

Reimplemented from Body.

Reimplemented in CargoBody, DynamicBody, Missile, Player, Ship, and SpaceStation.

Here is the call graph for this function:

◆ SetColliding()

void ModelBody::SetColliding ( bool  colliding)
Here is the call graph for this function:

◆ SetFrame()

void ModelBody::SetFrame ( FrameId  fId)
overridevirtual

Reimplemented from Body.

Reimplemented in DynamicBody, and Ship.

Here is the call graph for this function:

◆ SetLighting()

void ModelBody::SetLighting ( Graphics::Renderer r,
const Camera camera,
std::vector< float > &  oldIntensity,
Color oldAmbient 
)
protected
Here is the call graph for this function:

◆ SetModel()

void ModelBody::SetModel ( const char *  modelName)
Here is the call graph for this function:

◆ SetOrient()

void ModelBody::SetOrient ( const matrix3x3d r)
overridevirtual

Reimplemented from Body.

Here is the call graph for this function:

◆ SetPosition()

void ModelBody::SetPosition ( const vector3d p)
overridevirtual

Reimplemented from Body.

Here is the call graph for this function:

◆ SetStatic()

void ModelBody::SetStatic ( bool  isStatic)
Here is the call graph for this function:

◆ TimeStepUpdate()

void ModelBody::TimeStepUpdate ( const float  timeStep)
overridevirtual

Reimplemented from Body.

Reimplemented in CargoBody, DynamicBody, Missile, Ship, and SpaceStation.

Here is the call graph for this function:

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