12using namespace Triton;
18#include "CoordinateSystem.h"
29template<
class Param1 >
32typedef signal1< const Camera* > CameraSignal;
39 Camera(CoordinateSystem cs);
54 void TRITONAPI
SetCameraMatrix(
const double *m,
const double *explicitCameraPosition = 0);
92 return coordinateSystem;
109 return coordinateSystem < FLAT_ZUP;
144 bool TRITONAPI
GetViewport(
int& x,
int& y,
int& width,
int& height)
const;
148 void* TRITONAPI GetRenderTarget(
void)
const;
150 bool operator==(
const Camera& rhs)
const;
151 bool operator!=(
const Camera& rhs)
const;
153 double modelview[16], projection[16];
157 void ExtractFrustum();
161 CoordinateSystem coordinateSystem;
Common typedefs and defines used within Triton.
A 3D Vector class and its operations.
Triton's public interface for specifying the camera properties.
Definition: Camera.h:37
Vector3 TRITONAPI GetUpVector() const
Retrieves a normalized vector pointing "up", based on the coordinate system specified in Environment:...
const double *TRITONAPI GetProjectionMatrix() const
Retrieves an array of 16 doubles representing the projection matrix passed in via SetProjectionMatrix...
Definition: Camera.h:69
CameraSignal * signal_CameraDestroyed
Called just before the camera is deleted.
Definition: Camera.h:121
Vector3 TRITONAPI GetRightVector() const
Retrieves a normalized vector pointing "right", based on the coordinate system specified in Environme...
const char *TRITONAPI GetName(void) const
Get the name.
bool TRITONAPI IsGeocentric() const
Returns whether the CoordinateSystem passed set on the camera is geocentric, indicating an elliptical...
Definition: Camera.h:108
CoordinateSystem TRITONAPI GetCoordinateSystem(void) const
Returns the CoordinateSystem passed set on the camera, indicating the up vector and the presence of a...
Definition: Camera.h:91
void TRITONAPI SetName(const char *name)
Associated a name with a camera.
void TRITONAPI SetProjectionMatrix(const double *p)
Sets the projection matrix used for rendering the ocean; this must be called every frame prior to cal...
const double *TRITONAPI GetCameraPosition() const
Retrieves an array of 3 doubles representing the X, Y, and Z position of the camera,...
Definition: Camera.h:75
void TRITONAPI SetViewport(int x, int y, int width, int height)
Informs Triton of the current viewport position and size.
bool TRITONAPI CullSphere(const Vector3 &position, double radius) const
Returns true if the given sphere lies within the view frustum, as defined by the modelview - projecti...
const double *TRITONAPI GetCameraMatrix() const
Retrieves an array of 16 doubles representing the modelview matrix passed in via SetCameraMatrix().
Definition: Camera.h:64
bool TRITONAPI GetViewport(int &x, int &y, int &width, int &height) const
Retrieves any viewport information previously set via SetViewport().
void TRITONAPI SetCameraMatrix(const double *m, const double *explicitCameraPosition=0)
Sets the modelview matrix used for rendering the ocean; this must be called every frame prior to call...
void TRITONAPI SetRenderTarget(void *target)
Abstractly set/get the render target.
This base class for all Triton objects intercepts the new and delete operators, routing them through ...
Definition: MemAlloc.h:71
An oriented bounding box defined by a center point and three axes.
Definition: OrientedBoundingBox.h:18
A 3D double-precision Vector class and its operations.
Definition: Vector3.h:36