Questions tagged [vertex]

A vertex is a single point in a 3D object, used for simple model creation or advanced animation systems.

756 questions
0
votes
1 answer

Box2D Vertices in Shapes

I have a polygon shape in Box2D. The shape is a Triangle, wich I expect to have 3 vertices. In fact all shapes that I create will output 8 vertices. Why is this? And if I output the vertex count, that is always the correct amount. I dont want to…
Morten Høgseth
  • 338
  • 2
  • 4
  • 17
0
votes
1 answer

How to detect if an object lies between two points

Currently I am working on a minimum corridor length algorithm, and part of the setup involves coming up with a list of all adjacent points in the problem. Currently I have two arrays: one sorted with adjacent points on the x coordinate and the other…
ludo
  • 1,456
  • 2
  • 14
  • 26
0
votes
2 answers

Converting Vertex[] to graph

I am making a Pac-Man game and I am currently working on the ghosts AI. I am planning on using Dijkstra's algorithm for the pathfinding. My problem is that when my game is loaded the vertices for the graph are stored in a matrix. I am trying to…
Josh Sobel
  • 1,268
  • 3
  • 14
  • 27
0
votes
0 answers

Generation of 3D terrain with separate quads

I am working on code which should generate 3d terrain like this: I've made code before which generates the terrain with shared vertices, but since I want the quads to be textured separately, I'm going to need to have 4 vertices and 6 indices for…
Mark
  • 133
  • 1
  • 2
  • 8
0
votes
1 answer

Find a path in an incidence matrix

In an incidence matrix we have: e1 e2 e3 e4 e5 e6 v1 1 1 0 0 0 0 v2 0 0 1 1 0 1 v3 0 0 0 0 1 1 v4 1 0 1 0 0 0 v5 0 1 0 1 1 0 To find a path, we should find if the last vertex of and edge i is the start of another edge,…
mpluse
  • 1,857
  • 6
  • 18
  • 25
0
votes
1 answer

C Vertex Array wrong values

I have this declarations in my cc.h Vertex *graphVertices2; typedef struct { float XYZW[4]; float RGBA[4]; } Vertex; And in my cc.c i do the following: float vert [] = {306, 319, 360, 357, 375, 374, 387, 391, 391, 70, 82, 94, 91, 108, 114,…
Nick Spot
  • 257
  • 2
  • 4
  • 12
0
votes
1 answer

Where have I gone wrong with my cuboid?

I'm creating a cuboid in OpenGL using Vertex arrays but my texture seems to have gone a bit wrong. Heres my code: float halfW = getW() / 2; float halfH = getH() / 2; GLubyte myIndices[]={ 1, 0, 2, //front 2, 0, 3, 4, 5,…
Split
  • 259
  • 2
  • 5
  • 11
0
votes
0 answers

DFS and c-Expander graph - simple path with the length of n-2c+1

Just to make it clear - c-Expander graph is a directed graph G(V,E) with 2 Disjoint sets (A and B), of size equal or more than c with at least one Vertex between node of A and node of B. I have to prove there is a simple directed path of length…
SharonBL
  • 1,735
  • 5
  • 20
  • 28
0
votes
1 answer

igraph: csv file with centrality measures for each vertex AND attributes for each vertex

I have 2 databases: edge list, vertex list with attributes (geographical location, and category of actors) I build a graph G from my list of edges in the database db: G <- graph.edgelist(cbind(db.$Source,db$Target)) And I calculated centrality…
0
votes
1 answer

OpenGL normals misunderstanding?

I'm trying to get my lighting to work in OpenGL, using LWJGL as an implementation library. The problem I think I'm having, is that I don't set my normals properly and therefore the lighting doesn't work at certain angles. Here is the code for the…
Philippe Paré
  • 4,279
  • 5
  • 36
  • 56
0
votes
1 answer

glsl vertex shader compiles on pc, mac and not on another pc

So, I have a PC with an nvidia geforce gtx 580, a mac with some ATI card and then a notebook with a geforce gtx 680M. The vertex shader compiles on the 580 and the ATI, but not on the gtx 680M. The error is quite interesting (not): ERROR: 0:18: '':…
scippie
  • 2,011
  • 1
  • 26
  • 42
0
votes
2 answers

Opengl,C++ : Large number of points

I'm currently working on a program, that will be able to visualize the evolution of point on the plane that are flowing along a vectorfield. I've finished the first version which I've pasted below. When running the program with a large number of…
Martin
  • 103
  • 3
0
votes
1 answer

Find if fourth line makes a four-sided shape

Let's say I have 9 points on a plane and following image shows the sequence by which I put lines (vertices) on those points. and I keep track of points and lines both separately in a vector. And now I put another line (that can be anywhere) but…
abumusamq
  • 780
  • 1
  • 10
  • 29
0
votes
0 answers

What VertexFormat and Lighting to use in DirectX for multi colored models?

I'm new to DirectX and having trouble getting colors & lighting to work. I want to be able to load various colored vertices into a single vertex buffer and enable with directional lighting, however every method I try has problems. Imagine I want to…
Brendan Hill
  • 3,406
  • 4
  • 32
  • 61
0
votes
2 answers

About OpenGL Matrix Multiplications

http://www.cs.uaf.edu/2007/spring/cs481/lecture/01_23_matrices.html I have just finished reading this, but i have 2 questions about multiplications. gl_Position = gl_ProjectionMatrix*gl_ModelViewMatrix*gl_Vertex This is the final screen coordinates…
deniz
  • 2,427
  • 4
  • 27
  • 38