I'm puzzled by the usage of Ogre::Camera in Demo_BezierPatch

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
panyy
Gnoblar
Posts: 5
Joined: Wed Jul 27, 2005 5:43 am
Location: SZ

I'm puzzled by the usage of Ogre::Camera in Demo_BezierPatch

Post by panyy »

the Demo uses Camera like this:
mCamera->setPosition(500,500, 1500);
mCamera->lookAt(0,200,-300);

the Demo works well,but I wonder where is the 'UP' vector?
and I can't find any function in OgreCamera.h that set the 'UP' vector,is this a bug or something?

I'm not familiar with Ogre,but how can Ogre setup Camera without UP vector???
can anyone answer my question,best regards!
~Country Roads Take Me Home~
User avatar
Raven
Goblin
Posts: 203
Joined: Wed Mar 23, 2005 1:07 pm
Location: Melbourne, Australia
Contact:

Re: I'm puzzled by the usage of Ogre::Camera in Demo_BezierP

Post by Raven »

panyy wrote:but I wonder where is the 'UP' vector?
What do you mean by the 'UP' Vector :?:

Are you talking about Orientation?
I used up all my sick days, so I'm calling in dead.
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 8
Contact:

Post by haffax »

Camera::setUp() is not missing, it is just not there. Just use setOrientation() to set up and right vector (indirectly). In Ogre Camera is set up the way, that in its local coordinate system -z is the look at direction, +y is up and +x is right. Use setOrientation() to orient the camera in worldspace.
team-pantheon programmer
creators of Rastullahs Lockenpracht
panyy
Gnoblar
Posts: 5
Joined: Wed Jul 27, 2005 5:43 am
Location: SZ

Post by panyy »

for half day's work,I just finished my first Ogre Project,It's simple - only a ManualMesh in it,but I have learnt something like Ogre's Unique Camera ^_^,Mesh and SubMesh,etc.very happy,thanks for your help.

it's me,another question:
can I render a MunualMesh without IndexBuffer,say can I use OT_TRIANGLE_STRIP or OT_TRIANGLE_FAN?
~Country Roads Take Me Home~
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 8
Contact:

Post by haffax »

Afaik you can't, but you can subclass SimpleRenderable for better control of the RenderOperation and here you can use only a vertex buffer and operation types of your choice.
team-pantheon programmer
creators of Rastullahs Lockenpracht
Post Reply