Skip to content

Visualizer#2

Open
MinyazevR wants to merge 9 commits intomasterfrom
visualizer
Open

Visualizer#2
MinyazevR wants to merge 9 commits intomasterfrom
visualizer

Conversation

@MinyazevR
Copy link
Copy Markdown
Collaborator

No description provided.

#include "models.h"

namespace models {
class [[maybe_unused]] camera: public models {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Лучше именовать типы с заглавной, Camera. Это консистентно со схемой именования OpenCV, ну и вообще так почти все делают.

// Функция для проеции точек моделей на плоскость камеры
[[maybe_unused]] void displayModelPoints(const std::shared_ptr<models>& models);

[[maybe_unused]] cv::Mat getCameraPlane();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
[[maybe_unused]] cv::Mat getCameraPlane();
[[maybe_unused]] cv::Mat getCameraPlane() const;

Если оно не должно менять состояние объекта

Comment thread visualizer/include/coordinateSystem.h Outdated

#include "opencv2/opencv.hpp"

enum Axis{
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Интересно, что enum вне неймспейса. Алсо, enum class.

Comment thread visualizer/source/objParser.cpp Outdated
{
int n;
std::istringstream aStream(a);
aStream>>n;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
aStream>>n;
aStream >> n;

Comment thread visualizer/source/objParser.cpp Outdated
else if(substring == "f " || substring == "l ") {
std::istringstream v(line.substr(1));
std::string token;
std::vector<int> kek;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

:(


[[maybe_unused]] bool isValid();
virtual bool specificBorderIsValid() = 0;
};
Copy link
Copy Markdown
Owner

@osechkina-masha osechkina-masha Jan 7, 2023

Choose a reason for hiding this comment

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

virtual destructor here and further

@@ -0,0 +1,12 @@
#ifndef VISUALIZER_BORDERVALIDATOR_H
#define VISUALIZER_BORDERVALIDATOR_H
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

#pragma once
here and further

class Borders: public models{
protected:
std::shared_ptr<BorderValidator> validator;
public:
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Right order:
public
protected
private

class [[maybe_unused]] camera: public models {
private:
cv::Mat cameraPlane;
cv::Mat internalCameraParameters;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

intrinsic not internal

double zAngle;

public:
void move(const cv::Vec3d& offset);
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

translate?

std::vector<std::vector<int>> getIndexes();
cv::Vec3d getCoordinatesOfCenter();
models();
void moveInLocalCoordinates(cv::Vec3d vector);
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

for what?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants