GUInity
Public Member Functions | List of all members
RigidStatic Class Reference

#include <RigidStatic.hpp>

Inheritance diagram for RigidStatic:
Subject< RigidStatic > Component

Public Member Functions

 RigidStatic ()
 
virtual ~RigidStatic ()
 
virtual void init () override
 
virtual void destroy () override
 
virtual void tick (float deltaSecods) override
 
virtual void setActive (bool isActive) override
 
PxRigidDynamic * getRigidDynamic ()
 
virtual shared_ptr< Componentclone () override
 
virtual shared_ptr< ComponentDescriptiongetComponentDescription () override
 
virtual void deserialize (shared_ptr< ComponentDescription > desc) override
 
- Public Member Functions inherited from Component
 Component ()
 
virtual ~Component ()
 
virtual void awake ()
 
shared_ptr< ActorgetActor ()
 
void setActor (weak_ptr< Actor > actor)
 

Additional Inherited Members

- Static Public Member Functions inherited from Subject< RigidStatic >
static void addObserver (shared_ptr< Observer > observer)
 
static void removeObserver (shared_ptr< Observer > observer)
 
- Protected Member Functions inherited from Component
void setCopyMode (bool initWithData)
 
- Static Protected Member Functions inherited from Subject< RigidStatic >
static void notify (ComponentEventType type, shared_ptr< Component > component, bool isEditor)
 
static void notify (ActorEventType type, shared_ptr< Actor > actor, bool isEditor)
 
- Protected Attributes inherited from Component
bool initWithData
 
bool isActive
 

Detailed Description

RigidStatic is the component that adds real physics simulation to an Actor. It's static and can be moved by the Game but will never be moved due to physics simulation

Constructor & Destructor Documentation

RigidStatic::RigidStatic ( )

Default Constructor

RigidStatic::~RigidStatic ( )
virtual

Default Destructor

Member Function Documentation

shared_ptr< Component > RigidStatic::clone ( )
overridevirtual

Clones current component (Prototype Design Pattern)

Returns
shared_ptr to cloned RigidStatic Component

Implements Component.

void RigidStatic::destroy ( )
overridevirtual

Component destroy override. Releases the RigidDynamic body

Reimplemented from Component.

PxRigidDynamic * RigidStatic::getRigidDynamic ( )

physxRigidBody getter

Returns
pointer to PhysX RigidBody
void RigidStatic::init ( )
overridevirtual

Component init override. Creates a RigidDynamic body in the PhysX scene and sets it as Kinematic by default

Reimplemented from Component.

void RigidStatic::setActive ( bool  isActive)
overridevirtual

Component setActive override. Disables visualization and physics simulation in the PhysX scene

Reimplemented from Component.

void RigidStatic::tick ( float  deltaSeconds)
overridevirtual

Component tick override. Updates the PhysX scene with the Actor transform

Parameters
[in]deltaSecondslast frame duration

Reimplemented from Component.


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