A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Yavin
Bronze Sponsor
Posts: 140 Joined: Wed Mar 02, 2005 3:41 pm
Location: Lake Constance, Germany
Post
by Yavin » Mon May 09, 2005 7:43 pm
Hello Ogre::Team,
while working on some new JavaBindings I'm a little bit confused about the implementation of the Ogre::Ray class. Is it aim that the copy constructor isn't private or overloaded? I want to get a Ray object from Camera, but I need the object on the heap in order that it is alive when the scope goes back to Java. To make this work I will try the following:
Code: Select all
Ogre::Ray * pRay = new Ogre::Ray( pCam->getCameraToViewportRay( screenx, screeny ) );
Maybe someone can please tell me if this would be a good idea or not! IMHO that's not very nice.
Regards, Yavin
jacmoe
OGRE Retired Moderator
Posts: 20570 Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Post
by jacmoe » Mon May 09, 2005 8:05 pm
You are aware of Ogre4J ? (The Ogre java bindings in ogreaddons)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Yavin
Bronze Sponsor
Posts: 140 Joined: Wed Mar 02, 2005 3:41 pm
Location: Lake Constance, Germany
Post
by Yavin » Tue May 10, 2005 9:55 am
jacmoe wrote: You are aware of Ogre4J ?
Thanks for that hint but I'm one of the new maintainers of Ogre4J. On this account I am aware of Ogre4J!
monster
OGRE Community Helper
Posts: 1098 Joined: Mon Sep 22, 2003 2:40 am
Location: Melbourne, Australia
Post
by monster » Tue May 10, 2005 10:35 am
Yavin wrote: jacmoe wrote: You are aware of Ogre4J ?
Thanks for that hint but I'm one of the new maintainers of Ogre4J. On this account I am aware of Ogre4J!
Touché!
:wumpus:
OGRE Retired Team Member
Posts: 3067 Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1
Post
by :wumpus: » Tue May 10, 2005 11:24 am
pCam->getCameraToViewportRay returns an Ogre::Ray object, so it is very legal to use the copy constructor. (otherwise this return value wouldn't even work)