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

#include <EditorCollider.hpp>

Inheritance diagram for EditorCollider:
Subject< EditorCollider > Component

Public Member Functions

 EditorCollider ()
 
virtual ~EditorCollider ()
 
virtual void init () override
 
virtual void tick (float deltaSeconds) override
 
void setGameActor (shared_ptr< Actor > gameActor)
 
shared_ptr< ActorgetGameActor ()
 
PxRigidDynamic * getRigidStatic ()
 
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 destroy ()
 
virtual void setActive (bool isActive)
 
virtual void awake ()
 
shared_ptr< ActorgetActor ()
 
void setActor (weak_ptr< Actor > actor)
 

Additional Inherited Members

- Static Public Member Functions inherited from Subject< EditorCollider >
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< EditorCollider >
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

EditorCollider is a component used only by editor actors. They're used for queries only, so that when the user clicks on whatever Actor in the scene, we can find it using PhysX queries. The basic difference between the EditorCollider and the regular Collider is that this one has a reference to the real Game Actor.

Constructor & Destructor Documentation

EditorCollider::EditorCollider ( )
inline

Default Constructor

virtual EditorCollider::~EditorCollider ( )
inlinevirtual

Default Destructor. Virtual because inherits from Component

Member Function Documentation

shared_ptr< Component > EditorCollider::clone ( )
overridevirtual

Clones current component (Prototype Design Pattern)

Returns
nullptr, EditorColliders are not supposed to be cloned

Implements Component.

shared_ptr< Actor > EditorCollider::getGameActor ( )

gameActor getter

PxRigidDynamic * EditorCollider::getRigidStatic ( )

physxRigidStatic getter

void EditorCollider::init ( )
overridevirtual

Component init override. Initializes the rigid body in the PhysX scene.

Component tick override. Updates the fake collider position and rotation to match the real Game Actor

Reimplemented from Component.

void EditorCollider::setGameActor ( shared_ptr< Actor gameActor)

gameActor setter

void EditorCollider::tick ( float  deltaSeconds)
overridevirtual

Component tick override. Updates the fake collider position and rotation to match the real Game Actor

Component init override. Initializes the rigid body in the PhysX scene.

Reimplemented from Component.


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