Skip to content

Commit da616b9

Browse files
committed
Update AnatomyHelpers.md
1 parent bf6965b commit da616b9

File tree

2 files changed

+106
-17
lines changed

2 files changed

+106
-17
lines changed

docs/Virtual-Anatomy-(Unreal-Engine)/Explorer-level (hospital and simple environment)/MeshIsolator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Isolate Mesh
1+
# UCPP_IsolateMesh (Mesh Isolator)
22

33
## Class Description
44

docs/Virtual-Anatomy-(Unreal-Engine)/Explorer-level (hospital and simple environment)/Utilities/AnatomyHelpers.md

Lines changed: 105 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,85 +6,174 @@ A namespace containing utility functions for operations related to anatomy explo
66

77
## Public Methods
88

9-
### `AActor* GetActorByName(FString name, UWorld* world)`
9+
### `AActor* GetActorByName(FString& ActorName, UWorld* World)`
1010

1111
**Description**:
1212
Retrieves an actor from the world by its name.
1313

1414
**Parameters**:
15-
- `name`: The name of the actor to search for.
16-
- `world`: A pointer to the world where the search should occur.
15+
- `ActorName`: The name of the actor to search for.
16+
- `World`: A pointer to the world where the search should occur.
1717

1818
**Returns**:
1919
A pointer to the found actor. If the actor is not found, the function returns `nullptr`. Exercise caution when handling `nullptr` results.
2020

2121
---
2222

23-
### `AActor* GetRandomActor(UWorld* world)`
23+
### `AActor* GetRandomActor(UWorld* World)`
2424

2525
**Description**:
2626
Selects and retrieves a random actor from the scene.
2727

2828
**Parameters**:
29-
- `world`: A pointer to the world from which the actor will be retrieved.
29+
- `World`: A pointer to the world from which the actor will be retrieved.
3030

3131
**Returns**:
3232
A pointer to a random actor. If the scene is empty, the function returns `nullptr`.
3333

3434
---
3535

36-
### `TObjectPtr<UCPP_SimulationManager> GetSimulationManager(UWorld* world)`
36+
### `TObjectPtr<UCPP_SimulationManager> GetSimulationManager(UWorld* World)`
3737

3838
**Description**:
3939
Retrieves an instance of the simulation manager from the GameMode associated with the provided world.
4040

4141
**Parameters**:
42-
- `world`: The world in which the GameMode contains the simulation manager instance.
42+
- `World`: The world in which the GameMode contains the simulation manager instance.
4343

4444
**Returns**:
4545
A `TObjectPtr<UCPP_SimulationManager>` pointing to the simulation manager. If the simulation manager is not present in the GameMode, the function returns `nullptr`.
4646

4747
---
4848

49-
### `TObjectPtr<UCPP_IsolateMesh> GetIsolateMeshInstance(UWorld* world)`
49+
### `TObjectPtr<UCPP_IsolateMesh> GetIsolateMeshInstance(UWorld* World)`
5050

5151
**Description**:
5252
Obtains an instance of the mesh isolator class from the GameMode.
5353

5454
**Parameters**:
55-
- `world`: The world in which the GameMode contains the mesh isolator instance.
55+
- `World`: The world in which the GameMode contains the mesh isolator instance.
5656

5757
**Returns**:
5858
A `TObjectPtr<UCPP_IsolateMesh>` pointing to the mesh isolator class. If the instance is not present in the GameMode, the function returns `nullptr`.
5959

6060
---
6161

62-
### `TObjectPtr<UMeshSelector> GetMeshSelector(UWorld* world)`
62+
### `TObjectPtr<UMeshSelector> GetMeshSelector(UWorld* World)`
6363

6464
**Description**:
6565
Retrieves the mesh selector instance from the user character in the specified world.
6666

6767
**Parameters**:
68-
- `world`: The world containing the user character (instance of `UCPP_User`).
68+
- `World`: The world containing the user character (instance of `UCPP_User`).
6969

7070
**Returns**:
7171
A `TObjectPtr<UMeshSelector>` pointing to the mesh selector instance. If the world does not contain an instance of `UCPP_User`, the function returns `nullptr`.
7272

7373
---
7474

75-
### `float DegToRad(float angle)`
75+
### `float DegTo# AnatomyUtils
76+
77+
A namespace containing utility functions for operations related to anatomy exploration in the context of a game or simulation. These functions are specifically designed to work reliably at the explorer level. While most functions are robust, some may return `nullptr` under specific conditions, which requires caution during use.
78+
79+
---
80+
81+
## Public Methods
82+
83+
### `AActor* GetActorByName(FString& ActorName, UWorld* World)`
7684

7785
**Description**:
78-
Converts an angle from degrees to radians.
86+
Retrieves an actor from the world by its name.
7987

80-
**Parameters**:
81-
- `angle`: The angle in degrees.
88+
**Parameters**:
89+
- `ActorName`: The name of the actor to search for.
90+
- `World`: A pointer to the world where the search should occur.
91+
92+
**Returns**:
93+
A pointer to the found actor. If the actor is not found, the function returns `nullptr`. Exercise caution when handling `nullptr` results.
94+
95+
---
96+
97+
### `AActor* GetRandomActor(UWorld* World)`
98+
99+
**Description**:
100+
Selects and retrieves a random actor from the scene.
101+
102+
**Parameters**:
103+
- `World`: A pointer to the world from which the actor will be retrieved.
104+
105+
**Returns**:
106+
A pointer to a random actor. If the scene is empty, the function returns `nullptr`.
107+
108+
---
109+
110+
### `TObjectPtr<UCPP_SimulationManager> GetSimulationManager(UWorld* World)`
111+
112+
**Description**:
113+
Retrieves an instance of the simulation manager from the GameMode associated with the provided world.
114+
115+
**Parameters**:
116+
- `World`: The world in which the GameMode contains the simulation manager instance.
117+
118+
**Returns**:
119+
A `TObjectPtr<UCPP_SimulationManager>` pointing to the simulation manager. If the simulation manager is not present in the GameMode, the function returns `nullptr`.
120+
121+
---
122+
123+
### `TObjectPtr<UCPP_IsolateMesh> GetIsolateMeshInstance(UWorld* World)`
124+
125+
**Description**:
126+
Obtains an instance of the mesh isolator class from the GameMode.
127+
128+
**Parameters**:
129+
- `World`: The world in which the GameMode contains the mesh isolator instance.
130+
131+
**Returns**:
132+
A `TObjectPtr<UCPP_IsolateMesh>` pointing to the mesh isolator class. If the instance is not present in the GameMode, the function returns `nullptr`.
133+
134+
---
135+
136+
### `TObjectPtr<UMeshSelector> GetMeshSelector(UWorld* World)`
137+
138+
**Description**:
139+
Retrieves the mesh selector instance from the user character in the specified world.
140+
141+
**Parameters**:
142+
- `World`: The world containing the user character (instance of `UCPP_User`).
143+
144+
**Returns**:
145+
A `TObjectPtr<UMeshSelector>` pointing to the mesh selector instance. If the world does not contain an instance of `UCPP_User`, the function returns `nullptr`.
146+
147+
---
148+
149+
### `float ConvertBeatsPerMinuteToBeatsPerSecond(const float &BeatsPerMinute, float MaxPossibleBPS = 5)`;
150+
151+
**Description**:
152+
Calculates beats per minute to the beats per second
153+
154+
**Parameters**:
155+
- `BeatsPerMinute`: beats per minute of the heart
156+
- `MaxPossibleBPS`: maximum beats per seconds given in the Types/SlideBarParameter.h, we have to suply this number to properly scale how often "hearth releases new particles" default value is 5 since max possible BPM is 300 and 300 BPM / 60 sec = 5 BPS
157+
158+
**Returns**:
159+
How often should CPP_BloodParticleSystem tick, use this value to configure tick frequency.
160+
161+
---
162+
163+
### `float ConvertDegreesToRadians(float Angle)`
164+
165+
**Description**:
166+
Converts an angle from degrees to radians.
167+
168+
**Parameters**:
169+
- `Angle`: The angle in degrees.
82170

83171
**Returns**:
84-
The angle converted to radians.
172+
The angle converted to radians.
85173

86174
---
87175

176+
88177
## Notes
89178

90179
- Ensure the validity of pointers returned by these functions before usage to avoid null pointer dereferencing.

0 commit comments

Comments
 (0)