Cameras and aiming

2 messages Options
Embed this post
Permalink
henke37

Cameras and aiming

Reply Threaded More More options
Print post
Permalink
I noticed that it is impossible to rotate a normal camera with the
rotationXYZ "properties".
In the early versions, it was acceptable to have to use a FreeCamera for
the job, but now (with Great White), I think there is time to clean up
the camera classes.

I propose a few fairly simple changes:
1. Move and merge the code in the transformView method for the classes
Camera3D and FreeCamera3D to transformView in the CameraObject3D class,
since it is not dependent on the camera class any more if it should aim
at an object or just point in a direction.

The code to place in the CameraObject3D class would be:
if(this.target) {
   this.lookAt( this.target );
} elseif( this._transformDirty ) {
   updateTransform();
}

The speed should not suffer noticeably, since we where doing one of them
each frame already.

I have already tested this, and it had no compatibility issues.

2. In addition to the first, move the hover method of the Camera3D class
to the CameraObject3D class. This due to this refactoring moving all
camera independent code to the base class.

3. Since the Camera3D and FreeCamera3D classes now are empty, we can now
delete them

4. In order to provide compatibility and since the class now is usable
as it is, the CameraObject3D class is made concrete (non abstract) and
renamed to Camera3D (in this discussion, named newCamera3D)


(Note to the list admin, this is a repost, please just remove the
initial post that got caught in the moderation system, since I sent it
before subscribing)

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Paul deCoursey

Re: Cameras and aiming

Reply Threaded More More options
Print post
Permalink
What is up with Cameras in GreatWhite... I can't even pan or tilt my  
camera.  Maybe I'm using it wrong. Does anyone have any sample of  
moving cameras?

Paul

On Feb 6, 2008, at 2:41 PM, Henrik Andersson wrote:

> I noticed that it is impossible to rotate a normal camera with the
> rotationXYZ "properties".
> In the early versions, it was acceptable to have to use a FreeCamera  
> for
> the job, but now (with Great White), I think there is time to clean up
> the camera classes.
>
> I propose a few fairly simple changes:
> 1. Move and merge the code in the transformView method for the classes
> Camera3D and FreeCamera3D to transformView in the CameraObject3D  
> class,
> since it is not dependent on the camera class any more if it should  
> aim
> at an object or just point in a direction.
>
> The code to place in the CameraObject3D class would be:
> if(this.target) {
>   this.lookAt( this.target );
> } elseif( this._transformDirty ) {
>   updateTransform();
> }
>
> The speed should not suffer noticeably, since we where doing one of  
> them
> each frame already.
>
> I have already tested this, and it had no compatibility issues.
>
> 2. In addition to the first, move the hover method of the Camera3D  
> class
> to the CameraObject3D class. This due to this refactoring moving all
> camera independent code to the base class.
>
> 3. Since the Camera3D and FreeCamera3D classes now are empty, we can  
> now
> delete them
>
> 4. In order to provide compatibility and since the class now is usable
> as it is, the CameraObject3D class is made concrete (non abstract) and
> renamed to Camera3D (in this discussion, named newCamera3D)
>
>
> (Note to the list admin, this is a repost, please just remove the
> initial post that got caught in the moderation system, since I sent it
> before subscribing)
>
> _______________________________________________
> Papervision3D mailing list
> [hidden email]
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org


_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org