VR-Engage  2.2
Loading...
Searching...
No Matches
cigiEntityPublisherBase.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2024 MAK Technologies, Inc.
3** All rights reserved.
4*******************************************************************************/
5#pragma once
6
7//! @file cigiEntityPublisherBase.h
8//!
9//! @brief Base class for Publishers creating CIGI entities.
10//!
11//! Automatically acquires a CIGI EntityID from the Session.
12//!
13//! Instantiates an EntityUnpublisher when destroyed to handle clean removal
14//! of the entity from the IG.
15//!
16//! Uses CIGI type CigiBaseEntityCtrl.
17//!
18//! Note that a CIGI Entity is not directly analogous to a VR-Forces Entity.
19
20#include "vreCigiHost/export.h"
22
23#include <CigiBaseEntityCtrl.h>
24
25namespace makVre
26{
27
29 : public DtCigiPublisherTemplate<CigiBaseEntityCtrl, DtCigiEntityPublisherBase>
30{
31public:
33 virtual ~DtCigiEntityPublisherBase() override;
34
35 virtual Cigi_uint16 cigiId() const;
36
37 virtual bool init() override;
38
39protected:
40 virtual void initCigi() override;
41
42 virtual void tickChildren(double dt) override;
43 virtual void publishChildren(CigiOutgoingMsg& out) override;
44
45 //! @brief Invoked from destructor. Should create DtCigiEntityUnpublisher
46 //! to handle publishing of entity removal flag and cleanup upon receipt.
47 virtual void unpublish();
48};
49
50} // namespace makVre
virtual bool init() override
virtual void unpublish()
Invoked from destructor. Should create DtCigiEntityUnpublisher to handle publishing of entity removal...
virtual void publishChildren(CigiOutgoingMsg &out) override
DtCigiEntityPublisherBase()
Definition cigiEntityPublisherBase.h:32
virtual Cigi_uint16 cigiId() const
virtual void initCigi() override
Derived Publisher classes should override initCigi() to set initial values in the CIGI data.
virtual void tickChildren(double dt) override
virtual ~DtCigiEntityPublisherBase() override
Contains the DLL export macro.
#define CIGIHOST_DLL
Definition export.h:20
Include export definitions for this library.
Definition glsVreMessageUtil.h:49