Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glm::vec3 parameter to drawPlane() functions should be const. #6516

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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