Skip to content
This repository has been archived by the owner on Jul 8, 2022. It is now read-only.

Livre histogram support #301

Merged
merged 8 commits into from
Jun 22, 2016
Merged

Livre histogram support #301

merged 8 commits into from
Jun 22, 2016

Conversation

bilgili
Copy link
Contributor

@bilgili bilgili commented Jun 14, 2016

No description provided.

@bilgili bilgili force-pushed the histogram branch 9 times, most recently from 7b0ba4b to 5191d06 Compare June 16, 2016 09:04
@hernando
Copy link
Contributor

Why did you add a Doxyfile?


namespace
{
const size_t binCount = 256;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't we using uppercase names for constants?
Declare it as a static const member of Histogram instead of a global variable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was using the variable, but yes I can put into the class.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you already have the static member function in the class I would replace the function by a const static member and remove this one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@hernando
Copy link
Contributor

You haven't answered why you needed to add a Doxyfile.

setId( histogram.getId( ));
setArea( histogram.getArea( ));
_minIndex = -1u;
_maxIndex = -1u;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't you assign the values from the right hand side histogram?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

bool isCenterInViewport( const Frustum& frustum,
const Boxf& worldBox,
const Vector3f& minNdc = Vector3f( -1.0f ),
const Vector3f& maxNdc = Vector3f( 1.0f )) const
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make private

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, I am not seperating impl classes into privates etc.

const size_t binCount = _histogram->getBinsSize();
const float minVal = std::numeric_limits< SRC_TYPE >::min();
const float maxVal = std::numeric_limits< SRC_TYPE >::max();
const float range = maxVal - minVal;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For holding a 32 bit integer range these variables should be double.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch

@@ -118,7 +149,7 @@ struct Channel::Impl
public:
explicit Impl( Channel* channel )
: _channel( channel )
, _frameInfo( Frustum( Matrix4f(), Matrix4f()), INVALID_FRAME )
, _frameInfo( Frustum( Matrix4f(), Matrix4f()), INVALID_TIMESTEP, INVALID_TIMESTEP )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comment: you could use a default constructor in FrameInfo for this.

@hernando
Copy link
Contributor

Just some very minor comments left.
As eile suggested, don't forget to squash all the commits once they are ready.

@bilgili bilgili merged commit b7de0a7 into BlueBrain:master Jun 22, 2016
@bilgili bilgili deleted the histogram branch October 4, 2016 20:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants