openframeworks / openframeworks/openFrameworks

ofPlanePrimitive initialization out by 1

Open
#2,627 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug core prelim-analysis section-3D
Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

When an ofPlanePrimitive (ofMesh::plane) is created, it is initialised with values for 'rows' and 'columns' to describe the plane. At the moment this seems to be out by 1, so that you end up creating a plane with rows-1 and columns-1 rows and columns respectively.

To test this, just try creating a plane with 1 row and 1 column, e.g.
ofPlanePrimitive p = ofPlanePrimitive( 300, 300, 1, 1, OF_PRIMITIVE_TRIANGLE_STRIP );
p.drawWireframe();

You'll find that nothing is drawn.
Bug present in latest github code.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the ofPlanePrimitive/ofMesh::plane initialization used by the constructor in the issue, then reproduce the 1-row, 1-column example and call drawWireframe(). Check how the requested rows and columns become the generated plane dimensions. Done means a 1x1 plane is drawn and the requested row and column counts are preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.