Skip to main content

All Questions

Tagged with
5 votes
1 answer
117 views

How to find the greatest possible euclidean distance we can achieve by moving using given set of vectors

That's a problem from Polish Olympiad in Informatics, called Pionek (PIO). Given a set of not unique vectors, find the greatest possible euclidean distance in reference to (0,0) point you can achieve ...
Szyszka947's user avatar
2 votes
1 answer
137 views

When to overload an operator in C++ as a member of a user-defined data structure and when not? I am completely lost

For any of you who can help explain to me when and when not to overload an operator as a member of a class or struct for example or not as a member, like global one. The thing is that I am learning ...
pk6x's user avatar
  • 23
2 votes
0 answers
59 views

Position vector into global world position vector using a camera

I am programming a 2d rendering engine with opengl, imgui and c++. The problem is to turn my mouse position into global world position using a camera. This is my current code inside my ...
a coder's user avatar
  • 21
0 votes
1 answer
205 views

OpenGL Drawing 2 vectors with a given angle between them

I'm trying to draw in OpenGL 2 vectors with a given angle (in radians) between them, something like this: I managed to draw the vectors but I'm not sure how to place them at the specific angle: ...
Paul C's user avatar
  • 27
-1 votes
1 answer
164 views

Convert arbitrary grid of subpixel points to raster image

I hope you are doing well. I am stuck at one part of a visual effect program in C++, and wanted to ask for help. I have an array of colors at random positions on an image. There can be any number of ...
jonahclarsen's user avatar
-1 votes
1 answer
461 views

How to rasterize a vector image in C++ Win32 API

recently I have been trying to experiment with vector graphics in C++. I want to make a Win32 app that reads an svg file and shows it on the screen. The program currently is simple. A window opens ...
Hitarth Padaliya's user avatar
-1 votes
1 answer
411 views

c++/openGL - VBO/VAO code in class/object not rendering at all [duplicate]

I'm making a small game engine for vector graphics in OpenGL, and it is already broken in the early stages. I had it working with all the data for one object in the main.cpp file, but once I moved all ...
Zachary Berkowitz's user avatar
0 votes
0 answers
85 views

What is the signifigance of the Dot Product in World to Local Transformations?

Looking for help understanding why this World to Local Space function works. I'm working my way through Buckland's Programming Game AI By Example The following function is used in the book to convert ...
Ty Miles's user avatar
2 votes
1 answer
670 views

Generate a "pieslice" in C without using the pieslice() of graphics.h

In the BGI library's "graphics.h" header there is a function pieslice in that header file,its syntax is: #include <graphics.h> void pieslice(int x, int y, int stangle, int endangle, int radius)...
user avatar
0 votes
1 answer
704 views

Vector on upper half of hemisphere

I have a normal vector N, which defines the upper half of an hemisphere and an function, which creates random points P on the hemisphere. Now I want to know, if the randomly choosen point is on the ...
Philipp's user avatar
  • 15.6k
0 votes
1 answer
573 views

distance estimation opencv base on vector

I'm trying to calculate distance using OpenCV and by simulating 2d vector field. short story : I have : camera angle camera position 2 object position image : 2d field on x axis I have camera ...
itonia.x.i's user avatar
2 votes
1 answer
2k views

What is the "reference vector" in glm's orientedAngle() function?

https://glm.g-truc.net/0.9.4/api/a00210.html I'm trying to find the signed angle between two vectors in 3d space. I can't seem to find what the "reference vector" is in this function, mathematically....
dshus's user avatar
  • 168
0 votes
0 answers
66 views

Drawing solid triange in a cube result in flicker

I'm trying to draw a cube using software rendering. So I have I'm drawing a cube out of triangles. So I render a solid triangle. The cube is rendered successfully, but there are flicker while rotating ...
AndreAhmed's user avatar
-3 votes
1 answer
304 views

only one value inserted in vector in opengl code

unable to insert more than one element in vector; worked fine when I tested with an integer vector. tried the following: push_back function insert function assign function The issue is in the ...
Siddhesh Muley's user avatar
1 vote
0 answers
136 views

Qt QPainter moire effect on small render targets

I am drawing using QPainter a very complex vector image (a PCB board, to be precise) using only one color - Qt::black. The problem is that the input file has tons of horizontal rectangles as ...
sx107's user avatar
  • 309

15 30 50 per page
1
2 3 4 5