Polyphase Game Engine
Loading...
Searching...
No Matches
NodeGraphPlayer Class Reference

#include <NodeGraphPlayer.h>

Inheritance diagram for NodeGraphPlayer:
Node Object

Public Member Functions

 DECLARE_NODE (NodeGraphPlayer, Node)
 
 NodeGraphPlayer ()
 
virtual ~NodeGraphPlayer ()
 
virtual void Create () override
 
virtual void Destroy () override
 
virtual void Tick (float deltaTime) override
 
virtual void Start () override
 
virtual void Stop () override
 
virtual void BeginOverlap (Primitive3D *thisComp, Primitive3D *otherComp) override
 
virtual void EndOverlap (Primitive3D *thisComp, Primitive3D *otherComp) override
 
virtual void OnCollision (Primitive3D *thisComp, Primitive3D *otherComp, glm::vec3 impactPoint, glm::vec3 impactNormal, btPersistentManifold *manifold) override
 
virtual void GatherProperties (std::vector< Property > &outProps) override
 
virtual const char * GetTypeName () const override
 
void Play ()
 
void Pause ()
 
void StopGraph ()
 
void Reset ()
 
bool IsPlaying () const
 
bool IsPaused () const
 
void SetNodeGraphAsset (NodeGraphAsset *asset)
 
NodeGraphAssetGetNodeGraphAsset () const
 
bool SetInputFloat (const char *name, float value)
 
bool SetInputInt (const char *name, int32_t value)
 
bool SetInputBool (const char *name, bool value)
 
bool SetInputString (const char *name, const char *value)
 
bool SetInputVector (const char *name, const glm::vec3 &value)
 
bool SetInputColor (const char *name, const glm::vec4 &value)
 
bool SetInputByte (const char *name, uint8_t value)
 
bool SetInputAsset (const char *name, Asset *asset)
 
bool SetInputVector2D (const char *name, const glm::vec2 &value)
 
bool SetInputShort (const char *name, int16_t value)
 
bool SetInputNode (const char *name, Node *value)
 
bool SetInputNode3D (const char *name, Node *value)
 
bool SetInputWidget (const char *name, Node *value)
 
bool SetInputText (const char *name, Node *value)
 
bool SetInputQuad (const char *name, Node *value)
 
bool SetInputAudio3D (const char *name, Node *value)
 
bool SetInputScene (const char *name, Asset *asset)
 
bool SetInputSpline3D (const char *name, Node *value)
 
float GetOutputFloat (uint32_t pinIndex) const
 
int32_t GetOutputInt (uint32_t pinIndex) const
 
bool GetOutputBool (uint32_t pinIndex) const
 
std::string GetOutputString (uint32_t pinIndex) const
 
glm::vec2 GetOutputVector2D (uint32_t pinIndex) const
 
glm::vec3 GetOutputVector (uint32_t pinIndex) const
 
glm::vec4 GetOutputColor (uint32_t pinIndex) const
 
uint8_t GetOutputByte (uint32_t pinIndex) const
 
int16_t GetOutputShort (uint32_t pinIndex) const
 
AssetGetOutputAsset (uint32_t pinIndex) const
 
NodeGetOutputNode (uint32_t pinIndex) const
 
void SetPlayOnStart (bool v)
 
bool GetPlayOnStart () const
 
float GetDeltaTime () const
 
bool HasStartFired () const
 
const OverlapEventDataGetCurrentOverlapEventData () const
 
const CollisionEventDataGetCurrentCollisionEventData () const
 
NodeGraphGetRuntimeGraph ()
 
void FireNamedEvent (const char *eventName)
 
- Public Member Functions inherited from Node
 DECLARE_FACTORY_MANAGER (Node)
 
 DECLARE_FACTORY (Node, Node)
 
 DECLARE_OBJECT (Node, Object)
 
 DECLARE_SCRIPT_LINK_BASE (Node)
 
 Node ()
 
virtual ~Node ()
 
void DestroyDeferred ()
 
void Doom ()
 
virtual void SaveStream (Stream &stream, Platform platform)
 
virtual void LoadStream (Stream &stream, Platform platform, uint32_t version)
 
virtual void Copy (Node *srcNode, bool recurse)
 
virtual void Render (PipelineConfig pipelineConfig)
 
virtual void Awake ()
 
virtual void PrepareTick (std::vector< NodePtrWeak > &outTickNodes, bool game, bool recurse)
 
virtual void EditorTick (float deltaTime)
 
uint32_t GetLastTickedFrame () const
 
virtual void Render ()
 
virtual void OnInstanced ()
 
virtual VertexType GetVertexType () const
 
virtual void GatherReplicatedData (std::vector< NetDatum > &outData)
 
virtual void GatherNetFuncs (std::vector< NetFunc > &outFuncs)
 
void GatherPropertyOverrides (std::vector< Property > &outOverrides)
 
void ApplyPropertyOverrides (const std::vector< Property > &overs)
 
NodeId GetNodeId () const
 
uint64_t GetPersistentUuid () const
 
void SetPersistentUuid (uint64_t uuid)
 
void EnsurePersistentUuid ()
 
void EmitSignal (const std::string &name, const std::vector< Datum > &args)
 
void ConnectSignal (const std::string &name, Node *listener, SignalHandlerFP func)
 
void ConnectSignal (const std::string &name, Node *listener, const ScriptFunc &func)
 
void DisconnectSignal (const std::string &name, Node *listener)
 
void RenderShadow ()
 
void RenderSelected (bool renderChildren)
 
NodeCreateChild (TypeId nodeType)
 
NodeCreateChild (const char *typeName)
 
NodeCreateChildClone (Node *srcNode, bool recurse)
 
NodePtr Clone (bool recurse, bool instantiateLinkedScene=true, bool resolveNodePaths=false)
 
void DestroyAllChildren ()
 
NodeGetRoot ()
 
bool IsWorldRoot () const
 
NodeGetSubRoot ()
 
template<class NodeClass >
NodeClass * CreateChild ()
 
template<class NodeClass >
SharedPtr< NodeClass > CreateChildSp ()
 
template<class NodeClass >
NodeClass * CreateChild (const char *name)
 
template<class NodeClass >
SharedPtr< NodeClass > CreateChildSp (const char *name)
 
bool IsDestroyed () const
 
bool IsPendingDestroy () const
 
bool IsDoomed () const
 
bool HasStarted () const
 
bool HasAwoken () const
 
void EnableTick (bool enable)
 
bool IsTickEnabled () const
 
virtual void SetWorld (World *world, bool subRoot)
 
WorldGetWorld ()
 
void SetScene (Scene *scene)
 
SceneGetScene ()
 
uint8_t GetTargetScreen () const
 
void SetTargetScreen (uint8_t screen)
 
std::vector< NetDatum > & GetReplicatedData ()
 
void SetNetId (NetId id)
 
NetId GetNetId () const
 
NetHostId GetOwningHost () const
 
void SetOwningHost (NetHostId hostId, bool setAsPawn=false)
 
void SetReplicate (bool replicate)
 
bool IsReplicated () const
 
void SetReplicateTransform (bool repTransform)
 
bool IsTransformReplicated () const
 
void ForceReplication ()
 
void ClearForcedReplication ()
 
bool NeedsForcedReplication ()
 
virtual bool CheckNetRelevance (Node *playerNode)
 
bool IsAlwaysRelevant () const
 
void SetAlwaysRelevant (bool alwaysRelevant)
 
bool HasTag (const std::string &tag)
 
void AddTag (const std::string &tag)
 
void RemoveTag (const std::string &tag)
 
void SetName (const std::string &newName)
 
const std::string & GetName () const
 
virtual void SetActive (bool active)
 
bool IsActive (bool recurse=false) const
 
virtual void SetVisible (bool visible)
 
bool IsVisible (bool recurse=false) const
 
void SetTransient (bool transient)
 
virtual bool IsTransient () const
 
void SetPersistent (bool persistent)
 
bool IsPersistent () const
 
void SetDefault (bool isDefault)
 
bool IsDefault () const
 
void SetUserdataCreated (bool created)
 
bool IsUserdataCreated () const
 
virtual DrawData GetDrawData ()
 
virtual bool IsNode3D () const
 
virtual bool IsWidget () const
 
virtual bool IsPrimitive3D () const
 
virtual bool IsLight3D () const
 
NodeGetParent ()
 
const NodeGetParent () const
 
const std::vector< NodePtr > & GetChildren () const
 
virtual void Attach (Node *parent, bool keepWorldTransform=false, int32_t index=-1)
 
void Detach (bool keepWorldTransform=false)
 
void AddChild (Node *child, int32_t index=-1)
 
void RemoveChild (Node *child)
 
void RemoveChild (int32_t index)
 
template<typename T >
void AddChild (const SharedPtr< T > &child, int32_t index=-1)
 
template<typename T >
void RemoveChild (const SharedPtr< Node > &child)
 
int32_t FindChildIndex (const std::string &name) const
 
int32_t FindChildIndex (Node *child) const
 
NodeFindChild (const std::string &name, bool recurse) const
 
NodeFindChildWithTag (const std::string &name, bool recurse) const
 
NodeFindDescendant (const std::string &name)
 
NodeFindAncestor (const std::string &name)
 
bool HasAncestor (Node *node)
 
NodeGetChild (int32_t index) const
 
NodeGetChildByType (TypeId type) const
 
uint32_t GetNumChildren () const
 
int32_t FindParentNodeIndex () const
 
void SetHitCheckId (uint32_t id)
 
uint32_t GetHitCheckId () const
 
bool IsLateTickEnabled () const
 
void EnableLateTick (bool enable)
 
ScriptGetScript ()
 
void SetScriptFile (const std::string &fileName)
 
bool DoChildrenHaveUniqueNames () const
 
void BreakSceneLink ()
 
bool IsSceneLinked (bool ignoreInPie=true) const
 
bool IsSceneLinkedChild (bool ignoreInPie=true)
 
bool IsForeign () const
 
bool HasAuthority () const
 
bool IsOwned () const
 
bool IsLocallyControlled () const
 
Datum GetField (const std::string &key)
 
void SetField (const std::string &name, const Datum &value)
 
Datum GetField (int32_t key)
 
void SetField (int32_t key, const Datum &value)
 
Datum CallFunction (const std::string &name, const std::vector< Datum > &args={})
 
NetFuncFindNetFunc (const char *name)
 
NetFuncFindNetFunc (uint16_t index)
 
void InvokeNetFunc (const char *name)
 
void InvokeNetFunc (const char *name, Datum param0)
 
void InvokeNetFunc (const char *name, Datum param0, Datum param1)
 
void InvokeNetFunc (const char *name, Datum param0, Datum param1, Datum param2)
 
void InvokeNetFunc (const char *name, Datum param0, Datum param1, Datum param2, Datum param3)
 
void InvokeNetFunc (const char *name, Datum param0, Datum param1, Datum param2, Datum param3, Datum param4)
 
void InvokeNetFunc (const char *name, Datum param0, Datum param1, Datum param2, Datum param3, Datum param4, Datum param5)
 
void InvokeNetFunc (const char *name, Datum param0, Datum param1, Datum param2, Datum param3, Datum param4, Datum param5, Datum param6)
 
void InvokeNetFunc (const char *name, Datum param0, Datum param1, Datum param2, Datum param3, Datum param4, Datum param5, Datum param6, Datum param7)
 
void InvokeNetFunc (const char *name, const std::vector< Datum > &params)
 
const WeakPtr< Node > & GetSelfPtr () const
 
template<typename T >
T * FindChild (const std::string &name, bool recurse)
 
template<typename T >
void Traverse (T func, bool inverted=false)
 
template<typename T >
bool ForEach (T func, bool inverted=false)
 
- Public Member Functions inherited from Object
virtual ~Object ()=default
 
virtual const char * RuntimeName () const =0
 
virtual const char * RuntimeParentName () const =0
 
virtual RuntimeId InstanceRuntimeId () const =0
 
virtual ObjectQueryInterface (RuntimeId id) const
 
virtual bool Is (RuntimeId id) const
 
virtual bool Is (const char *name) const
 
virtual bool DrawCustomProperty (Property &prop)
 
template<typename T >
T * As () const
 
virtual bool Equals (const Object *rhs) const
 

Protected Member Functions

void EnsureRuntimeGraph ()
 
void FireEvent (const char *eventName)
 
void ProcessPhysicsEvents ()
 
- Protected Member Functions inherited from Node
void TickCommon (float deltaTime)
 
virtual void SetParent (Node *parent)
 
void ValidateUniqueChildName (Node *newChild)
 
void SendNetFunc (NetFunc *func, uint32_t numParams, const Datum **params)
 

Protected Attributes

AssetRef mNodeGraphAsset
 
NodeGraphmRuntimeGraph = nullptr
 
GraphProcessor mProcessor
 
bool mPlaying = false
 
bool mPaused = false
 
bool mPlayOnStart = false
 
bool mStartFired = false
 
float mDeltaTime = 0.0f
 
std::vector< OverlapEventDatamBeginOverlapQueue
 
std::vector< OverlapEventDatamEndOverlapQueue
 
std::map< CollisionPairKey, CollisionEventDatamCurrentCollisions
 
std::map< CollisionPairKey, CollisionEventDatamPreviousCollisions
 
OverlapEventData mCurrentOverlapEventData
 
CollisionEventData mCurrentCollisionEventData
 
- Protected Attributes inherited from Node
std::string mName
 
WorldmWorld = nullptr
 
NodePtrWeak mParent
 
NodePtrWeak mSelf
 
std::vector< NodePtrmChildren
 
std::unordered_map< std::string, Node * > mChildNameMap
 
std::unordered_map< std::string, SignalmSignalMap
 
std::string mScriptFile
 
uint32_t mLastTickedFrame = 0
 
bool mActive = true
 
bool mVisible = true
 
bool mTransient = false
 
bool mPersistent = false
 
bool mDefault = false
 
bool mUserdataCreated = false
 
bool mHasStarted = false
 
bool mHasAwoken = false
 
bool mDestroyed = false
 
bool mTickEnabled = true
 
bool mLateTick = false
 
SceneRef mScene
 
uint8_t mTargetScreen = 0
 
std::vector< std::string > mTags
 
NodeId mNodeId = INVALID_NODE_ID
 
uint64_t mPersistentUuid = 0
 
std::vector< NetDatummReplicatedData
 
NetId mNetId = INVALID_NET_ID
 
NetHostId mOwningHost = INVALID_HOST_ID
 
bool mReplicate = false
 
bool mReplicateTransform = false
 
bool mForceReplicate = false
 
bool mAlwaysRelevant = true
 
ScriptmScript = nullptr
 

Additional Inherited Members

- Static Public Member Functions inherited from Node
static NodePtr Construct (const std::string &name)
 
static NodePtr Construct (TypeId typeId)
 
static void Destruct (Node *node)
 
static void ProcessPendingDestroys ()
 
static void RegisterNetFuncs (Node *node)
 
static void Deleter (Node *node)
 
template<class NodeClass >
static SharedPtr< NodeClass > Construct ()
 
- Static Public Member Functions inherited from Object
static const char * ClassRuntimeName ()
 
- Static Protected Member Functions inherited from Node
static bool HandlePropChange (Datum *datum, uint32_t index, const void *newValue)
 
static bool OnRep_OwningHost (Datum *datum, uint32_t index, const void *newValue)
 
- Static Protected Attributes inherited from Node
static std::unordered_map< TypeId, NetFuncMapsTypeNetFuncMap
 
static std::unordered_set< NodePtrWeaksPendingDestroySet
 
static NodeId sNextNodeId = NodeId(1)
 

Constructor & Destructor Documentation

◆ NodeGraphPlayer()

NodeGraphPlayer::NodeGraphPlayer ( )

◆ ~NodeGraphPlayer()

NodeGraphPlayer::~NodeGraphPlayer ( )
virtual

Member Function Documentation

◆ BeginOverlap()

void NodeGraphPlayer::BeginOverlap ( Primitive3D thisComp,
Primitive3D otherComp 
)
overridevirtual

Reimplemented from Node.

◆ Create()

void NodeGraphPlayer::Create ( )
overridevirtual

Reimplemented from Node.

◆ DECLARE_NODE()

NodeGraphPlayer::DECLARE_NODE ( NodeGraphPlayer  ,
Node   
)

◆ Destroy()

void NodeGraphPlayer::Destroy ( )
overridevirtual

Reimplemented from Node.

◆ EndOverlap()

void NodeGraphPlayer::EndOverlap ( Primitive3D thisComp,
Primitive3D otherComp 
)
overridevirtual

Reimplemented from Node.

◆ EnsureRuntimeGraph()

void NodeGraphPlayer::EnsureRuntimeGraph ( )
protected

◆ FireEvent()

void NodeGraphPlayer::FireEvent ( const char *  eventName)
protected

◆ FireNamedEvent()

void NodeGraphPlayer::FireNamedEvent ( const char *  eventName)

◆ GatherProperties()

void NodeGraphPlayer::GatherProperties ( std::vector< Property > &  outProps)
overridevirtual

Reimplemented from Node.

◆ GetCurrentCollisionEventData()

const CollisionEventData & NodeGraphPlayer::GetCurrentCollisionEventData ( ) const
inline

◆ GetCurrentOverlapEventData()

const OverlapEventData & NodeGraphPlayer::GetCurrentOverlapEventData ( ) const
inline

◆ GetDeltaTime()

float NodeGraphPlayer::GetDeltaTime ( ) const
inline

◆ GetNodeGraphAsset()

NodeGraphAsset * NodeGraphPlayer::GetNodeGraphAsset ( ) const

◆ GetOutputAsset()

Asset * NodeGraphPlayer::GetOutputAsset ( uint32_t  pinIndex) const

◆ GetOutputBool()

bool NodeGraphPlayer::GetOutputBool ( uint32_t  pinIndex) const

◆ GetOutputByte()

uint8_t NodeGraphPlayer::GetOutputByte ( uint32_t  pinIndex) const

◆ GetOutputColor()

glm::vec4 NodeGraphPlayer::GetOutputColor ( uint32_t  pinIndex) const

◆ GetOutputFloat()

float NodeGraphPlayer::GetOutputFloat ( uint32_t  pinIndex) const

◆ GetOutputInt()

int32_t NodeGraphPlayer::GetOutputInt ( uint32_t  pinIndex) const

◆ GetOutputNode()

Node * NodeGraphPlayer::GetOutputNode ( uint32_t  pinIndex) const

◆ GetOutputShort()

int16_t NodeGraphPlayer::GetOutputShort ( uint32_t  pinIndex) const

◆ GetOutputString()

std::string NodeGraphPlayer::GetOutputString ( uint32_t  pinIndex) const

◆ GetOutputVector()

glm::vec3 NodeGraphPlayer::GetOutputVector ( uint32_t  pinIndex) const

◆ GetOutputVector2D()

glm::vec2 NodeGraphPlayer::GetOutputVector2D ( uint32_t  pinIndex) const

◆ GetPlayOnStart()

bool NodeGraphPlayer::GetPlayOnStart ( ) const
inline

◆ GetRuntimeGraph()

NodeGraph * NodeGraphPlayer::GetRuntimeGraph ( )
inline

◆ GetTypeName()

const char * NodeGraphPlayer::GetTypeName ( ) const
overridevirtual

Reimplemented from Node.

◆ HasStartFired()

bool NodeGraphPlayer::HasStartFired ( ) const
inline

◆ IsPaused()

bool NodeGraphPlayer::IsPaused ( ) const

◆ IsPlaying()

bool NodeGraphPlayer::IsPlaying ( ) const

◆ OnCollision()

void NodeGraphPlayer::OnCollision ( Primitive3D thisComp,
Primitive3D otherComp,
glm::vec3  impactPoint,
glm::vec3  impactNormal,
btPersistentManifold *  manifold 
)
overridevirtual

Reimplemented from Node.

◆ Pause()

void NodeGraphPlayer::Pause ( )

◆ Play()

void NodeGraphPlayer::Play ( )

◆ ProcessPhysicsEvents()

void NodeGraphPlayer::ProcessPhysicsEvents ( )
protected

◆ Reset()

void NodeGraphPlayer::Reset ( )

◆ SetInputAsset()

bool NodeGraphPlayer::SetInputAsset ( const char *  name,
Asset asset 
)

◆ SetInputAudio3D()

bool NodeGraphPlayer::SetInputAudio3D ( const char *  name,
Node value 
)

◆ SetInputBool()

bool NodeGraphPlayer::SetInputBool ( const char *  name,
bool  value 
)

◆ SetInputByte()

bool NodeGraphPlayer::SetInputByte ( const char *  name,
uint8_t  value 
)

◆ SetInputColor()

bool NodeGraphPlayer::SetInputColor ( const char *  name,
const glm::vec4 &  value 
)

◆ SetInputFloat()

bool NodeGraphPlayer::SetInputFloat ( const char *  name,
float  value 
)

◆ SetInputInt()

bool NodeGraphPlayer::SetInputInt ( const char *  name,
int32_t  value 
)

◆ SetInputNode()

bool NodeGraphPlayer::SetInputNode ( const char *  name,
Node value 
)

◆ SetInputNode3D()

bool NodeGraphPlayer::SetInputNode3D ( const char *  name,
Node value 
)

◆ SetInputQuad()

bool NodeGraphPlayer::SetInputQuad ( const char *  name,
Node value 
)

◆ SetInputScene()

bool NodeGraphPlayer::SetInputScene ( const char *  name,
Asset asset 
)

◆ SetInputShort()

bool NodeGraphPlayer::SetInputShort ( const char *  name,
int16_t  value 
)

◆ SetInputSpline3D()

bool NodeGraphPlayer::SetInputSpline3D ( const char *  name,
Node value 
)

◆ SetInputString()

bool NodeGraphPlayer::SetInputString ( const char *  name,
const char *  value 
)

◆ SetInputText()

bool NodeGraphPlayer::SetInputText ( const char *  name,
Node value 
)

◆ SetInputVector()

bool NodeGraphPlayer::SetInputVector ( const char *  name,
const glm::vec3 &  value 
)

◆ SetInputVector2D()

bool NodeGraphPlayer::SetInputVector2D ( const char *  name,
const glm::vec2 &  value 
)

◆ SetInputWidget()

bool NodeGraphPlayer::SetInputWidget ( const char *  name,
Node value 
)

◆ SetNodeGraphAsset()

void NodeGraphPlayer::SetNodeGraphAsset ( NodeGraphAsset asset)

◆ SetPlayOnStart()

void NodeGraphPlayer::SetPlayOnStart ( bool  v)
inline

◆ Start()

void NodeGraphPlayer::Start ( )
overridevirtual

Reimplemented from Node.

◆ Stop()

void NodeGraphPlayer::Stop ( )
overridevirtual

Reimplemented from Node.

◆ StopGraph()

void NodeGraphPlayer::StopGraph ( )

◆ Tick()

void NodeGraphPlayer::Tick ( float  deltaTime)
overridevirtual

Reimplemented from Node.

Member Data Documentation

◆ mBeginOverlapQueue

std::vector<OverlapEventData> NodeGraphPlayer::mBeginOverlapQueue
protected

◆ mCurrentCollisionEventData

CollisionEventData NodeGraphPlayer::mCurrentCollisionEventData
protected

◆ mCurrentCollisions

std::map<CollisionPairKey, CollisionEventData> NodeGraphPlayer::mCurrentCollisions
protected

◆ mCurrentOverlapEventData

OverlapEventData NodeGraphPlayer::mCurrentOverlapEventData
protected

◆ mDeltaTime

float NodeGraphPlayer::mDeltaTime = 0.0f
protected

◆ mEndOverlapQueue

std::vector<OverlapEventData> NodeGraphPlayer::mEndOverlapQueue
protected

◆ mNodeGraphAsset

AssetRef NodeGraphPlayer::mNodeGraphAsset
protected

◆ mPaused

bool NodeGraphPlayer::mPaused = false
protected

◆ mPlaying

bool NodeGraphPlayer::mPlaying = false
protected

◆ mPlayOnStart

bool NodeGraphPlayer::mPlayOnStart = false
protected

◆ mPreviousCollisions

std::map<CollisionPairKey, CollisionEventData> NodeGraphPlayer::mPreviousCollisions
protected

◆ mProcessor

GraphProcessor NodeGraphPlayer::mProcessor
protected

◆ mRuntimeGraph

NodeGraph* NodeGraphPlayer::mRuntimeGraph = nullptr
protected

◆ mStartFired

bool NodeGraphPlayer::mStartFired = false
protected

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