• Like
Vector of mesh
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Vector of mesh

  • 195 views
Published

 

Published in Technology , Business
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
195
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
2
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. stl::vector / ofMesh openFramework Workshop 20.02.2014, Q14
  • 2. simple 3D Calligraphy
  • 3. Konzept • Interaction ← Maus „Drag“ • z-Depth ← Zeitwert • Einfach 3D Umdrehung ← Tastatur
  • 4. Programmierung • struct / class → Datei speichern • stl::vector ← mouse X, mouse Y, z Depth, movingValue • ofMesh → OF_PRIMITIVE_TRIANGLE_STRIP
  • 5. Mouse X, Y Z ← update() struct / (class) vector.push_back( struct / (class) ) remove Vector ofRemove mesh.addVertex( vector iterator vec3 x,y,z ) mesh.draw() 3D Calligraphy (mesh Remove) ofRotate ← keyBoard Interaction
  • 6. struct saveMouseDataS - x, y, timeclick, movingValue - Die Datei werden in Vector gespeichert. http://www.cplusplus.com/doc/tutorial/structures/
  • 7. vector.push_back( ) Wenn die push_backl() läuft ab, die Datei in vector hingesetzt wird. ! vector.at(0) : x : 217, y : 120, timeClick : 0 vector.at(1) : x : 210, y : 130, timeClick : 10 vector.at(2) : x : 180, y : 141, timeClick : 23 vector.at(3) : x : 175, y : 147, timeClick : 30 vector.at(4) : x : 150, y : 151, timeClick : 47 …
  • 8. vector.at( ) - für eine Begreifbarkeit vector.at(i) → Aufzunehmen vector.at(i).x, vector.at(i).y, vector.at(i).timeClick, vector.at(i).x
  • 9. iterator http://openframeworks.cc/tutorials/c++%20concepts/001_stl_vectors_basic.html (*it) ≃ vector.at(i) ! (*it).x, (*it).y, (*it).timeClick
  • 10. ofRemove(saveMouseDataS, shouldRemove); Ohne die „ofRemove()“ Funktion wird das Size von der „saveMouseDataS (vector)“ groß geworden sein
  • 11. openGL OF_PRIMITIVE_TRIANGLE_STRIP
  • 12. mesh.draw() / mesh.drawWireframe(); Diese einfache Beispiel braucht „mesh.clear()“
  • 13. ohne „mesh.clear()“ langsam (low performance) ! aber „Interessanter Fehler :-)“ ! // // mesh.setMode(OF_PRIMITIVE_POINTS); mesh.draw(); mesh.drawWireframe(); mesh.clear();