Skip to content

Commit

Permalink
glm::vec3 parameter to drawPlane() functions should be const. (#6516)
Browse files Browse the repository at this point in the history
  • Loading branch information
prisonerjohn authored and arturoc committed Jan 8, 2020
1 parent c4f90bc commit 0d3ee1c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions libs/openFrameworks/graphics/of3dGraphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ void of3dGraphics::drawPlane(float x, float y, float z, float width, float heigh
}

//----------------------------------------------------------
void of3dGraphics::drawPlane(glm::vec3& position, float width, float height) const{
void of3dGraphics::drawPlane(const glm::vec3& position, float width, float height) const{
drawPlane(position.x,position.y,position.z,width, height);
}

Expand Down Expand Up @@ -554,7 +554,7 @@ void ofDrawPlane(float x, float y, float z, float width, float height){
}

//----------------------------------------------------------
void ofDrawPlane(glm::vec3& position, float width, float height){
void ofDrawPlane(const glm::vec3& position, float width, float height){
ofGetCurrentRenderer()->drawPlane(position,width,height);
}

Expand Down
4 changes: 2 additions & 2 deletions libs/openFrameworks/graphics/of3dGraphics.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void ofDrawPlane(float x, float y, float z, float width, float height);
/// \param position A 3D point specifying the plane's centroid.
/// \param width The width of the plane.
/// \param height The height of the plane.
void ofDrawPlane(glm::vec3& position, float width, float height);
void ofDrawPlane(const glm::vec3& position, float width, float height);

/// \brief Draw a plane with the current renderer at the origin.
/// \param width The width of the plane.
Expand Down Expand Up @@ -500,7 +500,7 @@ class of3dGraphics{
/// \param position A 3D point specifying the plane's centroid.
/// \param width The width to use when drawing the plane.
/// \param height The height to use when drawing the plane.
void drawPlane(glm::vec3& position, float width, float height) const;
void drawPlane(const glm::vec3& position, float width, float height) const;

/// \brief Draw a plane at the coordinate system's origin.
///
Expand Down
2 changes: 1 addition & 1 deletion libs/openFrameworks/graphics/ofGraphicsBaseTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,7 @@ class ofBaseRenderer{
/// \param width The width to use when drawing the plane with this renderer.
/// \param height The height to use when drawing the plane with this
/// renderer.
virtual void drawPlane(glm::vec3& position, float width, float height) const;
virtual void drawPlane(const glm::vec3& position, float width, float height) const;
/// \brief Draw a plane with the renderer at the origin.
///
/// The number of rows and columns this plane will have is dependent on this
Expand Down
2 changes: 1 addition & 1 deletion libs/openFrameworks/types/ofBaseTypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ void ofBaseRenderer::drawPlane(float x, float y, float z, float width, float hei
get3dGraphics().drawPlane(x,y,z,width,height);
}

void ofBaseRenderer::drawPlane(glm::vec3& position, float width, float height) const{
void ofBaseRenderer::drawPlane(const glm::vec3& position, float width, float height) const{
get3dGraphics().drawPlane(position,width,height);
}

Expand Down

0 comments on commit 0d3ee1c

Please sign in to comment.