21 float environmentWidth = std::abs(
getRoom().getMinWidth()) + std::abs(
getRoom().getMaxWidth());
22 float environmentWidthRS = std::abs(
getRoom().getMinWidthRS()) + std::abs(
getRoom().getMaxWidthRS());
23 return (((widthCoordinate -
getRoom().getMinWidthRS()) / environmentWidthRS) * environmentWidth) +
getRoom().
getMinWidth();
33 if (newHeightCoordinate >=
getRoom().getMaxHeight()) {
35 }
else if (newHeightCoordinate <= 0) {
39 return newHeightCoordinate;
43 float outputNumber = 0.0;
44 if (inputNumber >= 1) {
45 outputNumber = (1 - 2 * inputNumber);
46 }
else if (inputNumber <= -1) {
47 outputNumber = (-(1 + 2 * inputNumber));
49 outputNumber = (1 - std::abs(inputNumber) + 0.25);
58 std::vector <Point3D *> * newPoints =
new std::vector <Point3D *>;
60 for (
unsigned char i = 0; i < bodyKeyPointsMap.size(); i++) {
61 if (!bodyKeyPointsMap.at(i)) {
64 newPoints->push_back(
new Point3D(
67 pointsToMap.at(i)->getZ() - zOrigin +
getRoom().getDistanceCameraFromBackWall(),
BodyKeyPoint class is used for body keypoint creations and manipulations.
float inverseTransform(float inputNumber)
Implements the inverse conversion on the input value.
virtual std::vector< Point3D * > * mapToMeters(std::vector< Point3D * > pointsToMap, std::vector< bool > bodyKeyPointsMap, float xOrigin, float zOrigin)
This method requires pointers' Point3D's vector, the related vector map, and the original coordinates...
float transformWidthCoordinate(float widthCoordinate)
Converts width value.
const Room room
Specific room within which the coordinate mapping will be done.
float transformHeightCoordinate(float heightCoordinate)
Converts height value.
Room getRoom(void)
Returns the room object.
Point3D class is used for Point3D creations and manipulations.
Room class represents the Room abstraction. A Room object has different specifications,...
float getMaxHeightRS(void)
Get the RealSense environment's maximum height.
float getMinWidth(void)
Get the Room's minimum width.
float getHeightOffset(void)
Get the height offset.
float getMaxHeight(void)
Get the Room's maximum height.