VR-Engage  2.2
Loading...
Searching...
No Matches
vreHumanCrosswalkController.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6//! \file vreHumanCrosswalkController.h
7//! \ingroup vreVrfmodel
8//! \brief Controller for human crosswalk behavior
9//!
10//! This file defines the DtVreHumanCrosswalkController class which models the behavior
11//! of human entities when approaching and crossing at crosswalks. It handles street
12//! crossing logic including checking for approaching vehicles before crossing.
13
14#pragma once
15
16#include "vreVrfmodel/export.h"
17#include <vrfmodel/humanCrosswalkController.h>
18#include "vreVrfModel/vreSimComponent.h"
19
20namespace makVre
21{
22//! \brief Type identifier for the VRE human crosswalk controller component
23const char DtVreHumanCrosswalkControllerType[] = "vre-human-crosswalk-controller";
24
25//! \brief Controller for modeling human crosswalk behavior
26//!
27//! DtVreHumanCrosswalkController models the behavior of human entities when
28//! approaching and crossing at crosswalks. It manages the human's awareness of
29//! traffic, decision-making for when to cross safely, and interactions with
30//! traffic signals. The controller modifies the entity's movement based on
31//! environmental conditions and perceived safety.
32//!
33//! Uses Descriptor Type: DtVreHumanCrosswalkControllerDescriptor
34class VREVRFMODEL_DLL DtVreHumanCrosswalkController : public DtVreSimComponent<DtHumanCrosswalkController>
35{
36private:
37 //! \brief Default constructor (not implemented)
38 //!
39 //! Default constructor is private and not implemented to prevent
40 //! creation of instances without proper initialization.
42 //! \brief Copy constructor (not implemented)
43 //!
44 //! Copy constructor is private and not implemented to prevent
45 //! copy construction.
47 //! \brief Assignment operator (not implemented)
48 //! \return Reference to this object
49 //!
50 //! Assignment operator is private and not implemented to prevent assignment.
52
53public:
54 //! \brief Constructor
55 //! \param name The name of this component
56 //! \param owner The local object that owns this component
57 //! \param simManager The simulation services manager
58 //! \param desc Component descriptor with configuration parameters
59 //! \param parentRegistry Optional parent registry for reader/writer functionality
60 //!
61 //! Creates a new human crosswalk controller component with the specified parameters.
62 DtVreHumanCrosswalkController(const DtString& name, DtLocalObject* owner, DtSimulationServices* simManager,
63 DtComponentDescriptor* desc = 0, DtReaderWriterRegistry* parentRegistry = 0);
64
65 //! \brief Virtual destructor
66 //!
67 //! Cleans up resources used by the human crosswalk controller component.
69
70 //! \brief Gets the type identifier for this component
71 //! \return String identifying the component type (DtVreHumanCrosswalkControllerType)
72 //!
73 //! Implements the DtSimComponent::type() method to return the
74 //! type identifier for this component.
75 virtual const char* type() const override;
76
77 //! \brief Updates the controller state each simulation frame
78 //!
79 //! Processes the human entity's crosswalk behavior during each simulation frame.
80 //! This includes detecting nearby crosswalks, checking for approaching vehicles,
81 //! and making decisions about when to cross safely. The controller adjusts the
82 //! entity's movement based on these assessments.
83 virtual void tick() override;
84
85 //! \brief Factory method to create a new instance of this component
86 //! \param name The name for the new component
87 //! \param owner The local object that will own this component
88 //! \param simManager The simulation services manager
89 //! \param desc Optional component descriptor
90 //! \param parentRegistry Optional parent registry for reader/writer functionality
91 //! \return Pointer to the newly created component
92 //!
93 //! Static factory method used by the component creation system to instantiate
94 //! new instances of this component type.
95 static DtSimComponent* creator(const DtString& name, DtLocalObject* owner, DtSimulationServices* simManager,
96 DtComponentDescriptor* desc = 0, DtReaderWriterRegistry* parentRegistry = 0);
97};
98
99} // namespace makVre
virtual void tick() override
Updates the controller state each simulation frame.
static DtSimComponent * creator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
Factory method to create a new instance of this component.
DtVreHumanCrosswalkController()
Default constructor (not implemented)
DtVreHumanCrosswalkController & operator=(const DtVreHumanCrosswalkController &orig)
Assignment operator (not implemented)
DtVreHumanCrosswalkController(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
Constructor.
virtual const char * type() const override
Gets the type identifier for this component.
virtual ~DtVreHumanCrosswalkController() override
Virtual destructor.
DtVreHumanCrosswalkController(const DtVreHumanCrosswalkController &orig)
Copy constructor (not implemented)
DtVreSimComponent(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
Definition vreSimComponent.h:54
Defines export macros for the vreVrfmodel library.
#define VREVRFMODEL_DLL
Definition export.h:22
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
const char DtVreHumanCrosswalkControllerType[]
Type identifier for the VRE human crosswalk controller component.
Definition vreHumanCrosswalkController.h:23