Trax3 3.1.0
trax track library
Loading...
Searching...
No Matches
trax::AnimatedCamera Struct Referenceabstract

Interface for movable cameras. More...

#include <C:/Trend/Development/Trax3/Code/trax/rigid/modules/Camera.h>

Inheritance diagram for trax::AnimatedCamera:

Public Member Functions

virtual void AttachTo (std::shared_ptr< Module > pModule)=0
 If attached to a module, the camera will stay on top of the terrain and will not penetrate geoms in the scene.
virtual std::shared_ptr< ModuleGetModule () const =0
virtual std::vector< GeomList * > OverlapQuery (unsigned int filterflags) const =0
virtual GeomList * OverlapQueryAny (unsigned int filterflags) const =0
virtual void Update ()=0
 Updates the camera by the fixed time step.
virtual void StepBack ()=0
 Reverts the last positional change done by Update().
virtual void Stop ()=0
 Stops any animated inertial movement of the camera.
virtual void Reset ()=0
 Resets the position of the camera.
virtual void MaximumLinearVelocity (Velocity maxVelocity)=0
 Sets a maximum velocity that will not be exceeded.
virtual Velocity MaximumLinearVelocity () const =0
virtual void SetVelocity (const spat::Vector< Velocity > &velocity)=0
 Set the camera velocity directly.
virtual void SetVelocity (const spat::Vector< Velocity > &linearVelocity, const spat::Vector< AngularVelocity > &rotationalVelocity)=0
virtual void RotationalVelocity (const spat::Vector< AngularVelocity > &rotvel)=0
 Set the rotational velocity directly.
virtual Cameraoperator= (const Camera &camera)=0
Controller Input

Call these functions to provide the (scaled) input from the camera controller.

call these functions with the input gotten from the controllers like keyboard, mouse or joystick. The linear controller values are added to the linear velocities of the camera.

virtual void ControllerTranslateX (Velocity dx)=0
virtual void ControllerTranslateY (Velocity dy)=0
virtual void ControllerTranslateZ (Velocity dz)=0
virtual void ControllerRotateX (AngularVelocity dx)=0
virtual void ControllerRotateY (AngularVelocity dy)=0
virtual void ControllerRotateZ (AngularVelocity dz)=0
Damping

Attenuation of movement

virtual void DampingTranslate (Real damping)=0
virtual Real DampingTranslate () const =0
virtual void DampingRotate (Real damping)=0
virtual Real DampingRotate () const =0
Public Member Functions inherited from trax::Camera
virtual const char * TypeName () const noexcept=0
virtual CameraType GetType () const =0
virtual void SetFrame (const spat::Frame< Length, One > &frame)=0
 Sets position and orientation (pose) in global coordinates.
virtual spat::Vector< VelocityGetVelocity () const =0
 Gets the current velocity.
virtual void EyePoint (const spat::Position< Length > &eyePoint)=0
 Sets the camera to look at eyePoint.
virtual spat::Position< LengthEyePoint () const =0
virtual void Up (const spat::Vector< One > &up)=0
virtual spat::Vector< OneUp () const =0
virtual void LookAt (const spat::Position< Length > &lookAtPoint)=0
virtual spat::Position< LengthLookAt () const =0
virtual bool InFrustum (const spat::Position< Length > &position) const =0
virtual const spat::Frame< Length, One > & GetFrame () const =0
virtual spat::Frame< Length, One > & GetFrame ()=0
Public Member Functions inherited from trax::Frustum
virtual void SetFromFofy (Angle fovy=default_fovy, One aspect=default_aspect, Length zn=default_nearPlane, Length zf=default_farPlane)=0
virtual void SetFromDimensions (Length width, Length height, Length zn=default_nearPlane, Length zf=default_farPlane)=0
virtual void PlaneDistances (const common::Interval< Length > &planes)=0
virtual Length NearPlaneDistance () const =0
virtual Length FarPlaneDistance () const =0
virtual void Width (Length width)=0
virtual Length Width () const =0
virtual void Height (Length height)=0
virtual Length Height () const =0
virtual void Fovy (Angle fovy)=0
 The Field Of View angle in radiants.
virtual Angle Fovy () const =0
virtual void AspectRatio (One aspect)=0
virtual One AspectRatio () const =0
virtual void ProjectionMatrix (const spat::Transformation< Real > &projection)=0
virtual const spat::Transformation< Real > & ProjectionMatrix () const =0
virtual spat::Transformation< Real > & ProjectionMatrix ()=0
 Frustum (const Frustum &)=delete
 Frustum (Frustum &&)=delete
Frustum & operator= (const Frustum &)=delete
Frustum & operator= (Frustum &&)=delete
Public Member Functions inherited from trax::Identified< Camera >
virtual const std::string & Reference (const std::string &name) const=0
 Gets a reference that was set for this object by name.
virtual const std::vector< char const * > & ReferenceNames (const std::string &namePart) const=0
 Searches for all reference names that countain namePart as substring in the name.
virtual IDType ID () const noexcept=0
 Identified (const Identified &)=delete
Identified & operator= (const Identified &)=delete

Additional Inherited Members

Static Public Member Functions inherited from trax::Camera
static dclspc std::unique_ptr< CameraMake (CameraType type=CameraType::cam_basic) noexcept
 Makes a Camera object.
Static Public Attributes inherited from trax::Frustum
static const Angle default_fovy
static const One default_aspect
static const Length default_nearPlane
static const Length default_farPlane

Detailed Description

Interface for movable cameras.

Member Function Documentation

◆ AttachTo()

virtual void trax::AnimatedCamera::AttachTo ( std::shared_ptr< Module > pModule)
pure virtual

If attached to a module, the camera will stay on top of the terrain and will not penetrate geoms in the scene.

Implemented in trax::BodyCam.

◆ GetModule()

virtual std::shared_ptr< Module > trax::AnimatedCamera::GetModule ( ) const
pure virtual
Returns
the Module this camera is attached to.

◆ MaximumLinearVelocity()

virtual void trax::AnimatedCamera::MaximumLinearVelocity ( Velocity maxVelocity)
pure virtual

Sets a maximum velocity that will not be exceeded.

Parameters
maxVelocityA value in the range [0,+infinite]. The default is +infinite.

◆ operator=()

virtual Camera & trax::Camera::operator= ( const Camera & camera)
virtual

Implements trax::Camera.

◆ Update()

virtual void trax::AnimatedCamera::Update ( )
pure virtual

Updates the camera by the fixed time step.

Call this function once per simulation step.


The documentation for this struct was generated from the following file:
  • C:/Trend/Development/Trax3/Code/trax/rigid/modules/Camera.h