diff --git a/libs/openFrameworks/3d/ofNode.h b/libs/openFrameworks/3d/ofNode.h index d3cfb9b13b7..2045717b29e 100644 --- a/libs/openFrameworks/3d/ofNode.h +++ b/libs/openFrameworks/3d/ofNode.h @@ -28,14 +28,16 @@ class ofNode { /// \{ /// \brief Set parent for the node. The node will inherit transformations from parent. - /// \param param0 Reference to the ofNode which becomes the parent node. - /// \param param1 Boolean if maintain child's global transformations (default = false). /// + /// \param parent Reference to the ofNode which becomes the parent node. + /// \param bMaintainGlobalTransform Boolean if maintain child's global + /// transformations (default = false). void setParent(ofNode& parent, bool bMaintainGlobalTransform = false); /// \brief Remove parent node linking. - /// \param param0 Boolean if maintain child's global transformations (default = false). /// + /// \param bMaintainGlobalTransform Boolean if maintain child's global + /// transformations (default = false). void clearParent(bool bMaintainGlobalTransform = false); /// \brief Get the parent node of this node. @@ -182,6 +184,7 @@ class ofNode { glm::quat getGlobalOrientation() const; /// \brief Get global scale of node in xyz axes where 1 is default. + /// /// \returns The global scale in the xyz axes where 1 = 100% of size. glm::vec3 getGlobalScale() const; @@ -190,60 +193,61 @@ class ofNode { /// \{ /// \brief Set the local position of the node using xyz coordinates. - /// \param param0 Desired local x coordinate as a float. - /// \param param1 Desired local y coordinate as a float. - /// \param param2 Desired local z coordinate as a float. /// + /// \param px Desired local x coordinate as a float. + /// \param py Desired local y coordinate as a float. + /// \param pz Desired local z coordinate as a float. void setPosition(float px, float py, float pz); /// \brief Set the local position of the node using a 3D vector of coordinates. - /// \param param0 Desired local xyz coordinates as ref to 3D vector. /// + /// \param p Desired local xyz coordinates as ref to 3D vector. void setPosition(const glm::vec3& p); /// \brief Set the global position of the node using xyz coordinates. - /// \param param0 Desired global x coordinate as a float. - /// \param param1 Desired global y coordinate as a float. - /// \param param2 Desired global z coordinate as a float. /// + /// \param px Desired global x coordinate as a float. + /// \param py Desired global y coordinate as a float. + /// \param pz Desired global z coordinate as a float. void setGlobalPosition(float px, float py, float pz); /// \brief Set the global position of the node using a 3D vector of coordinates. - /// \param param0 Desired global xyz coordinates as ref to 3D vector. /// + /// \param p Desired global xyz coordinates as ref to 3D vector. void setGlobalPosition(const glm::vec3& p); /// \brief Set local orientation with a quaternion. - /// \param param0 Desired local orientation as ref to an glm::quat. /// + /// \param q Desired local orientation as ref to an glm::quat. void setOrientation(const glm::quat& q); /// \brief Set local orientation with xyz euler angles. - /// \param param0 Desired local xyz angles in degrees, as ref to 3D vector. /// + /// \param eulerAngles Desired local xyz angles in degrees, as ref to 3D vector. /// \note Using euler angles can cause gimbal lock. /// \sa https://en.wikipedia.org/wiki/Gimbal_lock void setOrientation(const glm::vec3& eulerAngles); /// \brief Set global orientation with a quaternion. - /// \param param0 Desired global orientation as ref to an glm::quat. + /// + /// \param q Desired global orientation as ref to an glm::quat. void setGlobalOrientation(const glm::quat& q); /// \brief Set local uniform scale (x, y, and z are equally scaled). - /// \param param0 Desired scale for all axes as a float where 1 = 100%. /// + /// \param s Desired scale for all axes as a float where 1 = 100%. void setScale(float s); /// \brief Set local scale for xyz axes individually. - /// \param param0 Desired local scale for x axis as a float where 1 = 100%. - /// \param param1 Desired local scale for y axis as a float where 1 = 100%. - /// \param param2 Desired local scale for z axis as a float where 1 = 100%. /// + /// \param sx Desired local scale for x axis as a float where 1 = 100%. + /// \param sy Desired local scale for y axis as a float where 1 = 100%. + /// \param sz Desired local scale for z axis as a float where 1 = 100%. void setScale(float sx, float sy, float sz); /// \brief Set local scale for xyz axes individually with a 3D vector. - /// \param param0 Desired local scale for all axes as ref to 3D vector where 1 = 100%. /// + /// \param s Desired local scale for all axes as ref to 3D vector where 1 = 100%. void setScale(const glm::vec3& s); /// \} @@ -251,192 +255,184 @@ class ofNode { /// \{ /// \brief Move node by relative amount with xyz coordinates. - /// \param param0 Desired relative position change along x axis as a float. - /// \param param1 Desired relative position change along y axis as a float. - /// \param param2 Desired relative position change along z axis as a float. /// + /// \param x Desired relative position change along x axis as a float. + /// \param y Desired relative position change along y axis as a float. + /// \param z Desired relative position change along z axis as a float. void move(float x, float y, float z); /// \brief Move node by relative amount with xyz as ref to 3D vector. - /// \param param0 Desired relative position change along all axes as ref to 3D vector. + /// \param offset Desired relative position change along all axes as ref to 3D vector. void move(const glm::vec3& offset); /// \brief Move node left+right relative to current position (in local x axis). - /// \param param0 Desired relative position change along local x axis as float. /// + /// \param amount Desired relative position change along local x axis as float. void truck(float amount); /// \brief Move node up+down relative to current position (in local y axis). - /// \param param0 Desired relative position change along local y axis as float. /// + /// \param amount Desired relative position change along local y axis as float. void boom(float amount); /// \brief Move node backward+forward relative to current position (in local z axis). - /// \param param0 Desired relative position change along local z axis as float. + /// + /// \param amount Desired relative position change along local z axis as float. void dolly(float amount); - - /// \brief Tilt up+down relative to current orientation (around local x axis). - /// \param param0 Desired relative rotation change along local x axis in degrees as float. OF_DEPRECATED_MSG("Use the Deg/Rad version", void tilt(float degrees)); /// \brief Tilt up+down relative to current orientation (around local x axis). - /// \param param0 Desired relative rotation change along local x axis in degrees as float. + /// + /// \param degrees Desired relative rotation change along local x axis in degrees as float. void tiltDeg(float degrees); /// \brief Tilt up+down relative to current orientation (around local x axis). - /// \param param0 Desired relative rotation change along local x axis in radians as float. + /// + /// \param radians Desired relative rotation change along local x axis in radians as float. void tiltRad(float radians); - /// \brief Rotate left+right relative to current orientation (around local y axis). - /// \param param0 Desired relative rotation change along local y axis in degrees as float. OF_DEPRECATED_MSG("Use the Deg/Rad version", void pan(float degrees)); /// \brief Rotate left+right relative to current orientation (around local y axis). - /// \param param0 Desired relative rotation change along local y axis in degrees as float. + /// + /// \param degrees Desired relative rotation change along local y axis in degrees as float. void panDeg(float degrees); /// \brief Rotate left+right relative to current orientation (around local y axis). - /// \param param0 Desired relative rotation change along local y axis in radians as float. + /// + /// \param radians Desired relative rotation change along local y axis in radians as float. void panRad(float radians); - /// \brief Roll left+right relative to current orientation (around local z axis). - /// \param param0 Desired relative rotation change along local z axis in degrees as float. OF_DEPRECATED_MSG("Use the Deg/Rad version", void roll(float degrees)); /// \brief Roll left+right relative to current orientation (around local z axis). - /// \param param0 Desired relative rotation change along local z axis in degrees as float. + /// + /// \param degrees Desired relative rotation change along local z axis in degrees as float. void rollDeg(float degrees); /// \brief Roll left+right relative to current orientation (around local z axis). - /// \param param0 Desired relative rotation change along local z axis in radians as float. + /// + /// \param radians Desired relative rotation change along local z axis in radians as float. void rollRad(float radians); /// \brief Rotate relative to current orientation by quaternion. - /// \param param0 Desired relative rotation change as a ref to quaternion. + /// + /// \param q Desired relative rotation change as a ref to quaternion. void rotate(const glm::quat& q); - /// \brief Rotate relative to current orientation around arbitrary axis. - /// \param param0 Desired relative angle change in degrees as float. - /// \param param1 Desired axis to rotate around as a ref to cartesian 3D Vector. OF_DEPRECATED_MSG("Use the Deg/Rad version", void rotate(float degrees, const glm::vec3& v)); /// \brief Rotate relative to current orientation around arbitrary axis. - /// \param param0 Desired relative angle change in degrees as float. - /// \param param1 Desired axis to rotate around as a ref to cartesian 3D Vector. /// + /// \param degrees Desired relative angle change in degrees as float. + /// \param v Desired axis to rotate around as a ref to cartesian 3D Vector. void rotateDeg(float degrees, const glm::vec3& v); /// \brief Rotate relative to current orientation around arbitrary axis. - /// \param param0 Desired relative angle change in radians as float. - /// \param param1 Desired axis to rotate around as a ref to cartesian 3D Vector. + /// + /// \param radians Desired relative angle change in radians as float. + /// \param v Desired axis to rotate around as a ref to cartesian 3D Vector. void rotateRad(float radians, const glm::vec3& v); - /// \brief Rotate relative to current orientation around arbitrary axis. - /// \param param0 Desired relative angle change in degrees as float. - /// \param param1 X angle of the axis to rotate around in degrees as float. - /// \param param2 Y angle of the axis to rotate around in degrees as float. - /// \param param3 Z angle of the axis to rotate around in degrees as float. OF_DEPRECATED_MSG("Use the Deg/Rad version", void rotate(float degrees, float vx, float vy, float vz)); /// \brief Rotate relative to current orientation around arbitrary axis. - /// \param param0 Desired relative angle change in degrees as float. - /// \param param1 X angle of the axis to rotate around in degrees as float. - /// \param param2 Y angle of the axis to rotate around in degrees as float. - /// \param param3 Z angle of the axis to rotate around in degrees as float. + /// + /// \param degrees Desired relative angle change in degrees as float. + /// \param vx X angle of the axis to rotate around in degrees as float. + /// \param vy Y angle of the axis to rotate around in degrees as float. + /// \param vz Z angle of the axis to rotate around in degrees as float. void rotateDeg(float degrees, float vx, float vy, float vz); /// \brief Rotate relative to current orientation around arbitrary axis. - /// \param param0 Desired relative angle change in radians as float. - /// \param param1 X angle of the axis to rotate around in degrees as float. - /// \param param2 Y angle of the axis to rotate around in degrees as float. - /// \param param3 Z angle of the axis to rotate around in degrees as float. + /// + /// \param radians Desired relative angle change in radians as float. + /// \param vx X angle of the axis to rotate around in radians as float. + /// \param vy Y angle of the axis to rotate around in radians as float. + /// \param vz Z angle of the axis to rotate around in radians as float. void rotateRad(float radians, float vx, float vy, float vz); /// \brief Rotate relative to current orientation by quaternion around point. - /// \param param0 Desired relative rotation change as a ref to quaternion. - /// \param param1 Point to rotate around in local xyz coordinates as ref to 3D vector. + /// + /// \param q Desired relative rotation change as a ref to quaternion. + /// \param point Point to rotate around in local xyz coordinates as ref to 3D vector. void rotateAround(const glm::quat& q, const glm::vec3& point); - /// \brief Rotate relative to current orientation around arbitrary axis around point. - /// \param param0 Desired relative angle change in degrees as float. - /// \param param1 The arbitrary axis to rotate around as ref to cartesian 3D vector. - /// \param param2 Point to rotate around in local xyz coordinates as ref to 3D vector. OF_DEPRECATED_MSG("Use the Deg/Rad version", void rotateAround(float degrees, const glm::vec3& axis, const glm::vec3& point)); /// \brief Rotate relative to current orientation around arbitrary axis around point. - /// \param param0 Desired relative angle change in degrees as float. - /// \param param1 The arbitrary axis to rotate around as ref to cartesian 3D vector. - /// \param param2 Point to rotate around in local xyz coordinates as ref to 3D vector. + /// + /// \param degrees Desired relative angle change in degrees as float. + /// \param axis The arbitrary axis to rotate around as ref to cartesian 3D vector. + /// \param point Point to rotate around in local xyz coordinates as ref to 3D vector. void rotateAroundDeg(float degrees, const glm::vec3& axis, const glm::vec3& point); /// \brief Rotate relative to current orientation around arbitrary axis around point. - /// \param param0 Desired relative angle change in degrees as float. - /// \param param1 The arbitrary axis to rotate around as ref to cartesian 3D vector. - /// \param param2 Point to rotate around in local xyz coordinates as ref to 3D vector. + /// + /// \param radians Desired relative angle change in degrees as float. + /// \param axis The arbitrary axis to rotate around as ref to cartesian 3D vector. + /// \param point Point to rotate around in local xyz coordinates as ref to 3D vector. void rotateAroundRad(float radians, const glm::vec3& axis, const glm::vec3& point); - /// \brief Orient node to look at point (-z axis pointing to global position). - /// \param param0 XYZ coordinates of point to look at as ref to 3D vector. - /// \note This version calculates the up vector automatically to try to keep - /// it relatively consistant with the original angle. + /// \brief Orient node to look at point (-z axis pointing to global position). + /// + /// \param lookAtPosition XYZ coordinates of point to look at as ref to 3D vector. + /// \note This version calculates the up vector automatically to try to keep + /// it relatively consistant with the original angle. void lookAt(const glm::vec3& lookAtPosition); /// \brief Orient node to look at point (-z axis pointing to global position). - /// \param param0 XYZ coordinates of point to look at as ref to 3D vector. - /// \param param1 The desired up axis as a cartesian 3D vector. + /// \param lookAtPosition XYZ coordinates of point to look at as ref to 3D vector. + /// \param upVector The desired up axis as a cartesian 3D vector. void lookAt(const glm::vec3& lookAtPosition, glm::vec3 upVector); /// \brief Orient node to look at another node (-z axis pointing at other node). - /// \param param0 A reference to the node to look at. - /// \note This version calculates the up vector automatically to try to keep - /// it relatively consistant with the original angle. + /// + /// \param lookAtNode A reference to the node to look at. + /// \note This version calculates the up vector automatically to try to keep + /// it relatively consistant with the original angle. void lookAt(const ofNode& lookAtNode); /// \brief Orient node to look at another node (-z axis pointing at other node). - /// \param param0 A reference to the node to look at. - /// \param param1 The desired up axis as a ref to cartesian 3D vector. + /// \param lookAtNode A reference to the node to look at. + /// \param upVector The desired up axis as a ref to cartesian 3D vector. void lookAt(const ofNode& lookAtNode, const glm::vec3& upVector); - /// \brief Orbit node around a global position at a specific radius. - /// \param param0 The longitudinal position of the node in degrees as float. - /// \param param1 The latitudinal position of the node in degrees as float. - /// \param param2 The desired radius from the position in degrees as float. - /// \param param3 The global position to orbit around as ref to 3D vector. Default = (0, 0, 0). OF_DEPRECATED_MSG("Use the Deg/Rad version", void orbit(float longitude, float latitude, float radius, const glm::vec3& centerPoint = glm::vec3(0, 0, 0))); - - /// \brief Orbit node around another node at a specific radius. - /// \param param0 The longitudinal position of the node in degrees as float. - /// \param param1 The latitudinal position of the node in degrees as float. - /// \param param2 The desired radius from the other node in degrees as float. - /// \param param3 A reference to the node to rotate around. OF_DEPRECATED_MSG("Use the Deg/Rad version", void orbit(float longitude, float latitude, float radius, ofNode& centerNode)); /// \brief Orbit node around a global position at a specific radius. - /// \param param0 The longitudinal position of the node in degrees as float. - /// \param param1 The latitudinal position of the node in degrees as float. - /// \param param2 The desired radius from the position in degrees as float. - /// \param param3 The global position to orbit around as ref to 3D vector. Default = (0, 0, 0). + /// + /// \param longitude The longitudinal position of the node in degrees as float. + /// \param latitude The latitudinal position of the node in degrees as float. + /// \param radius The desired radius from the position in degrees as float. + /// \param centerPoint The global position to orbit around as ref to 3D vector. + /// Default = (0, 0, 0). void orbitDeg(float longitude, float latitude, float radius, const glm::vec3& centerPoint = glm::vec3(0, 0, 0)); /// \brief Orbit node around another node at a specific radius. - /// \param param0 The longitudinal position of the node in degrees as float. - /// \param param1 The latitudinal position of the node in degrees as float. - /// \param param2 The desired radius from the other node in degrees as float. - /// \param param3 A reference to the node to rotate around. + /// \param longitude The longitudinal position of the node in degrees as float. + /// \param latitude The latitudinal position of the node in degrees as float. + /// \param radius The desired radius from the position in degrees as float. + /// \param centerNode The global position to orbit around as ref to 3D vector. + /// Default = (0, 0, 0). void orbitDeg(float longitude, float latitude, float radius, ofNode& centerNode); /// \brief Orbit node around a global position at a specific radius. - /// \param param0 The longitudinal position of the node in radians as float. - /// \param param1 The latitudinal position of the node in radians as float. - /// \param param2 The desired radius from the position in radians as float. - /// \param param3 The global position to orbit around as ref to 3D vector. Default = (0, 0, 0). + /// + /// \param longitude The longitudinal position of the node in radians as float. + /// \param latitude The latitudinal position of the node in radians as float. + /// \param radius The desired radius from the position in degrees as float. + /// \param centerPoint The global node to orbit around as ref to 3D vector. + /// Default = (0, 0, 0). void orbitRad(float longitude, float latitude, float radius, const glm::vec3& centerPoint = glm::vec3(0, 0, 0)); /// \brief Orbit node around another node at a specific radius. - /// \param param0 The longitudinal position of the node in radians as float. - /// \param param1 The latitudinal position of the node in radians as float. - /// \param param2 The desired radius from the other node in radians as float. - /// \param param3 A reference to the node to rotate around. + /// \param longitude The longitudinal position of the node in radians as float. + /// \param latitude The latitudinal position of the node in radians as float. + /// \param radius The desired radius from the position in degrees as float. + /// \param centerNode The global node to orbit around as ref to 3D vector. + /// Default = (0, 0, 0). void orbitRad(float longitude, float latitude, float radius, ofNode& centerNode); /// \} @@ -444,14 +440,14 @@ class ofNode { /// \{ /// \brief Set opengl renderer's modelview matrix to this nodes transform. - /// \param param0 A pointer to the renderer you want to set to this node's transform; + /// \param renderer A pointer to the renderer you want to set to this node's transform; /// \note If you want to draw something at the position+orientation+scale of this node, /// call ofNode::transform(); write your draw code, and ofNode::restoreTransform(); /// OR A simpler way is to extend ofNode and override ofNode::customDraw(); void transformGL(ofBaseRenderer * renderer = nullptr) const; /// \brief Restore opengl renderer's previous modelview transform matrix. - /// \param param0 A pointer to the renderer you want to restore transformation to; + /// \param renderer A pointer to the renderer you want to restore transformation to. void restoreTransformGL(ofBaseRenderer * renderer = nullptr) const; @@ -463,7 +459,7 @@ class ofNode { /// \{ /// \brief If you extend ofNode and wish to change the way it draws, extend this. - /// \param param0 A pointer to the renderer you want to draw to. + /// \param renderer A pointer to the renderer you want to draw to. /// \note Try to not use global functions for rendering and instead use the passed /// renderer. virtual void customDraw(const ofBaseRenderer * renderer) const; @@ -486,14 +482,16 @@ class ofNode { void createMatrix(); void updateAxis(); - /// \brief classes extending ofNode can override this method to get - /// notified when the position changed. + /// \brief Classes extending ofNode can override this method to get + /// notified when the position changed. virtual void onPositionChanged() {} - /// \brief classes extending ofNode can override this methods to get notified when the orientation changed. + /// \brief classes extending ofNode can override this methods to get notified + /// when the orientation changed. virtual void onOrientationChanged() {} - /// \brief classes extending ofNode can override this methods to get notified when the scale changed. + /// \brief classes extending ofNode can override this methods to get notified + /// when the scale changed. virtual void onScaleChanged() {} ofNode * parent = nullptr;