ATTENTION

This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices.


flexsim.com

Go Back   FlexSim Community Forum > FlexSim Software > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 02-24-2014
Alan Brims Alan Brims is offline
Flexsim User
 
Join Date: Nov 2013
Location: Perth, Western Australia
Posts: 1
Downloads: 30
Uploads: 0
Thanks: 6
Thanked 5 Times in 1 Post
Rep Power: 0
Alan Brims is on a distinguished road
Default Mesh API

The What's New for FlexSim 7 says
Quote:
Many openGL commands have been deprecated... Going forward you should use the mesh api.
I can see the various Mesh commands in the User Manual but is there any documentation on how to use these commands together? Alternatively, a small sample model using the Mesh API would be ideal.

Thanks,
Alan
The Following 4 Users Say Thank You to Alan Brims For This Useful Post:
Steven Hamoen (02-25-2014)
  #2  
Old 02-26-2014
Carsten Seehafer's Avatar
Carsten Seehafer Carsten Seehafer is offline
FlexSim Geek
 
Join Date: Oct 2008
Location: Ritterhude, Deutschland
Posts: 230
Downloads: 45
Uploads: 1
Thanks: 474
Thanked 320 Times in 143 Posts
Rep Power: 379
Carsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud of
Default

Please take a look into the mesh class it is well documented inside. The comments use xml (you can build your own documentation for the mesh class with doxygen, if you want).

You find the mesh.h-file at "C:\Program Files\FlexSim7\program\system\include\mesh.h" or similar.

Inside this file is a short hint how to use this class:
"/// <summary> A class encapsulating data and functionality for drawing geometry in OpenGL.</summary>
/// <remarks> The mesh class, and its accompanying mesh api in flexscript, replace the old immediate-mode
/// OpenGL rendering using glBegin() and glEnd(). To use the mesh class you initialize the mesh
/// with Mesh::init() (or the mesh() command in flexscript), defining what data you are
/// going to provide with each vertex, such as normals, texture coordinates, etc. Then you fill
/// the mesh with vertex data, either by adding vertices one at a time with
/// Mesh::addVertex() and Mesh::setVertexAttrib() (using the meshaddvertex() and meshsetvertexattrib()
/// commands in flexscript), or by copying a full set of vertex data in
/// with Mesh::defineVertexAttribs() </remarks>"[source: mesh.h]

It's also a good idea to start with general informations about mesh (like google).

I hope this is a little help, if you want to start right now
The Following 8 Users Say Thank You to Carsten Seehafer For This Useful Post:
Tom David (02-26-2014)
  #3  
Old 02-26-2014
Anthony Johnson's Avatar
Anthony Johnson Anthony Johnson is offline
Manager of Product Development
 
Join Date: Jul 2007
Posts: 440
Downloads: 86
Uploads: 4
Thanks: 171
Thanked 899 Times in 288 Posts
Rep Power: 735
Anthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond repute
Default

Here's a simple sample model.

And Carsten is correct. Right now the most detailed documentation is in mesh.h.
Attached Files
File Type: fsm MeshAPISample.fsm (20.0 KB, 272 views)

Last edited by Phil BoBo; 06-08-2016 at 07:46 AM.
The Following 5 Users Say Thank You to Anthony Johnson For This Useful Post:
RalfGruber (03-04-2014)

Tags
mesh, opengl



All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.