Ocean
Loading...
Searching...
No Matches
ProximitySensor.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#ifndef META_OCEAN_SCENEDESCRIPTION_SDX_X3D_PROXIMITY_SENSOR_NODE_H
9#define META_OCEAN_SCENEDESCRIPTION_SDX_X3D_PROXIMITY_SENSOR_NODE_H
10
13
14namespace Ocean
15{
16
17namespace SceneDescription
18{
19
20namespace SDX
21{
22
23namespace X3D
24{
25
26/**
27 * This class implements a proximity sensor node.
28 * @ingroup scenedescriptionsdxx3d
29 */
30class OCEAN_SCENEDESCRIPTION_SDX_X3D_EXPORT ProximitySensor : virtual public X3DEnvironmentalSensorNode
31{
32 public:
33
34 /**
35 * Creates an abstract proximity sensor node.
36 * @param environment Node environment
37 */
38 explicit ProximitySensor(const SDXEnvironment* environment);
39
40 protected:
41
42 /**
43 * Specifies the node type and the fields of this node.
44 * @return Unique node specification of this node
45 */
47
48 /**
49 * Event function for the new position and orientaiton inside the defined bounding box.
50 * @see EnvironmentalSensorNode::onInsideBoundingBox().
51 */
52 void onInsideBoundingBox(const Vector3& translation, const Quaternion& orientation, const Timestamp timestamp) override;
53
54 /**
55 * Returns the address of the most derived object.
56 * @see Node::objectAddress().
57 */
58 size_t objectAddress() const override;
59
60 protected:
61
62 /// CenterOfRotation_changed field.
64
65 /// Orientation_changed field.
67
68 /// Position_changed field.
70
71 /// Last local orientation.
73
74 /// Last local translation.
76};
77
78}
79
80}
81
82}
83
84}
85
86#endif // META_OCEAN_SCENEDESCRIPTION_SDX_X3D_PROXIMITY_SENSOR_NODE_H
This class implements a node specification object.
Definition scenedescription/Node.h:77
This class implements a proximity sensor node.
Definition ProximitySensor.h:31
ProximitySensor(const SDXEnvironment *environment)
Creates an abstract proximity sensor node.
SingleVector3 positionChanged_
Position_changed field.
Definition ProximitySensor.h:69
NodeSpecification specifyNode()
Specifies the node type and the fields of this node.
Vector3 lastLocalTranslation_
Last local translation.
Definition ProximitySensor.h:75
SingleRotation orientationChanged_
Orientation_changed field.
Definition ProximitySensor.h:66
Quaternion lastLocalOrientation_
Last local orientation.
Definition ProximitySensor.h:72
size_t objectAddress() const override
Returns the address of the most derived object.
SingleVector3 centerOfRotationChanged_
CenterOfRotation_changed field.
Definition ProximitySensor.h:63
void onInsideBoundingBox(const Vector3 &translation, const Quaternion &orientation, const Timestamp timestamp) override
Event function for the new position and orientaiton inside the defined bounding box.
This class implements an abstract x3d envrionmental sensor node.
Definition X3DEnvironmentalSensorNode.h:37
This class implements a node environment container.
Definition SDXNode.h:62
This class implements a timestamp.
Definition Timestamp.h:36
The namespace covering the entire Ocean framework.
Definition Accessor.h:15