OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

Specifying indices of triangle vertices when creating osg::geometry


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
antiro42
User


Joined: 01 Sep 2017
Posts: 41

PostPosted: Thu Dec 21, 2017 12:44 pm    Post subject:
Specifying indices of triangle vertices when creating osg::geometry
Reply with quote

Hi,

I want to create a specific mesh using osg. I have a set of vertices and a set of indices for the triangles which the mesh should consist of.

I tried using osg::geometry to create this mesh but I can't figure out how to specify the triangle vertex indices. Do I need an osg::IndexArray for this? How do I set it? There is a setVertexArray() member function for osg::geometry but nothing to specify indices.

I also looked at the primitive sets to see if I could specify indices there but I couldn't figure it out.

I tried both google and going through the example code without any success. Any help would be much appreciated!

Thank you!

Cheers,
antiro
Back to top
View user's profile Send private message
Alberto Luaces
Guest





PostPosted: Thu Dec 21, 2017 12:50 pm    Post subject:
Specifying indices of triangle vertices when creating osg::geometry
Reply with quote

"antiro black" writes:

Quote:
I also looked at the primitive sets to see if I could specify indices
there but I couldn't figure it out.

the example you are looking for is osggeometry:

https://github.com/openscenegraph/OpenSceneGraph/blob/master/examples/osggeometry/osggeometry.cpp#L685

--
Alberto



------------------
Post generated by Mail2Forum
Back to top
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Same vertices selected multiple times arennuit General 4 Thu Jan 11, 2018 3:13 pm View latest post
No new posts Using visitor to transfer material co... wernerM General 1 Mon Jan 08, 2018 4:14 pm View latest post
No new posts Adapting a height field with a triang... reedev General 5 Tue Sep 05, 2017 7:16 am View latest post
No new posts [osgAnimation::TransformHardware]bug ... mp3butcher General 5 Tue Aug 22, 2017 10:37 pm View latest post
No new posts ViewerBase::frame() method slow after... gambr General 8 Fri Jul 21, 2017 9:11 am View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP