CEL

Public API Reference

iPcNewCamera Struct Reference

This is a camera property class. More...

#include <propclass/newcamera.h>

Inheritance diagram for iPcNewCamera:

List of all members.

Public Member Functions

virtual size_t AttachCameraMode (CEL_CAMERA_MODE modetype)=0
 Attaches a built-in camera mode to this camera.
virtual size_t AttachCameraMode (iCelCameraMode *mode)=0
 Attaches a camera mode to this camera.
virtual bool DetectCollisions () const =0
 Returns whether the camera will use collision detection to avoid moving through walls.
virtual void Draw ()=0
 Render.
virtual const csVector3GetBaseDir () const =0
 Gets the base direction of the camera.
virtual const csVector3GetBaseOrigin () const =0
 Gets the base origin of the camera in world coordinates.
virtual const csVector3GetBasePos () const =0
 Gets the base position of the camera in world coordinates.
virtual const
csReversibleTransform
GetBaseTrans () const =0
 Gets the base transform of the camera.
virtual const csVector3GetBaseUp () const =0
 Gets the base up vector of the camera.
virtual iCelCameraMode * GetCameraMode (int idx=-1)=0
 Gets the specified camera mode.
virtual float GetCollisionAvoidanceInterpolation () const =0
 Get the collision avoidance movement interpolation value.
virtual float GetCollisionAvoidanceRadiusSq () const =0
 Get the player collision avoidance radius.
virtual float GetCollisionCorrection () const =0
 Get collision correction multiplier.
virtual bool GetCollisionDetection () const =0
 Returns whether the camera will use collision detection to avoid moving through walls.
virtual float GetCollisionSpringCoefficient () const =0
 Returns the spring coefficient that is used when a collision is detection.
virtual float GetCollisionYAvoidance () const =0
 Get the Y offset avoidance value.
virtual float GetCollisionYFocusOffset () const =0
 Get the y focus offset used in collision detection.
virtual iCelCameraMode * GetCurrentCameraMode ()=0
 Gets the current camera mode.
virtual size_t GetCurrentCameraModeIndex () const =0
 Gets the index of the current camera mode.
virtual const csVector3GetOrigin () const =0
 Gets the current origin of the camera.
virtual float GetOriginSpringCoefficient () const =0
 Returns the origin spring coefficient that will be used for attached camera mode.
virtual const csVector3GetPos () const =0
 Gets the current position of the camera.
virtual float GetSpringCoefficient () const =0
 Returns the common spring coefficient that will be used for attached camera mode.
virtual const csVector3GetTarget () const =0
 Gets the current target of the camera.
virtual float GetTargetSpringCoefficient () const =0
 Returns the target spring coefficient that will be used for attached camera mode.
virtual const csOrthoTransformGetTransform ()=0
 Get the transform corresponding to this camera.
virtual float GetTransitionCutoffOriginDistance () const =0
 Grabs the camera transition cutoff distance from origin to origin between the camera and the camera mode.
virtual float GetTransitionCutoffPosDistance () const =0
 Grabs the camera transition cutoff distance from position to position between the camera and the camera mode.
virtual float GetTransitionCutoffTargetDistance () const =0
 Grabs the camera transition cutoff distance from target to target between the camera and the camera mode.
virtual float GetTransitionSpringCoefficient () const =0
 This gets the springyness of the transition to a new camera mode when a new camera mode is selected.
virtual float GetTransitionTime () const =0
 Get the time to transition to a new mode.
virtual const csVector3GetUp () const =0
 Gets the current up vector of the camera.
virtual float GetUpSpringCoefficient () const =0
 Returns the up vector spring coefficient that will be used for attached camera mode.
virtual bool InCameraTransition () const =0
 Determines whether the camera is currently in a transition from one camera mode to another.
virtual void NextCameraMode ()=0
 Sets the current camera mode to the next available mode.
virtual void PrevCameraMode ()=0
 Sets the current camera mode to the previous available mode.
template<typename T >
csPtr< T > QueryModeInterface (int idx=-1)
 Gets the camera mode's specialised interface.
virtual bool Reset ()=0
 Reset the camera position.
virtual void SetCameraPositionOffset (const csVector3 &offset)=0
 Sets the offset from the center of the mesh's iMovable to the position of the camera.
virtual void SetCollisionAvoidanceInterpolation (float aint)=0
 Set the interpolation used in the collision avoidance.
virtual void SetCollisionAvoidanceRadiusSq (float radsq)=0
 Set the player collision avoidance radius.
virtual void SetCollisionCorrection (float corr)=0
 multiplier for projected beam used in collision detection to place camera.
virtual void SetCollisionDetection (bool detectCollisions)=0
 Sets whether the camera will use collision detection to avoid moving through walls.
virtual void SetCollisionSpringCoefficient (float springCoef)=0
 Sets the spring coefficient that will be used when a collision is detected.
virtual void SetCollisionYAvoidance (float yavoid)=0
 Set the y offset for camera to move upwards by for avoidance when it comes too close.
virtual void SetCollisionYFocusOffset (float yoff)=0
 Set the y offset from player position for collision detection focus.
virtual bool SetCurrentCameraMode (size_t modeIndex)=0
 Sets the current camera mode.
virtual void SetOriginSpringCoefficient (float springCoef)=0
 Sets the origin spring coefficient that will be used for attached camera mode.
virtual void SetPositionOffset (const csVector3 &offset)=0
 Sets the offset from the center of the mesh's iMovable (deprecated).
virtual void SetSpringCoefficient (float springCoef)=0
 Sets the common spring coefficient that will be used for attached camera mode.
virtual void SetTargetMinimumOffset (float minoff)=0
 Sets the minimum allowed offset up until the target.
virtual void SetTargetPositionOffset (const csVector3 &offset)=0
 Sets the offset from the center of the mesh's iMovable to the position of the camera.
virtual void SetTargetSpringCoefficient (float springCoef)=0
 Sets the target spring coefficient that will be used for attached camera mode.
virtual void SetTransitionCutoffDistance (float cutOffOriginDist, float cutOffTargetDist)=0
 If the distance between the current camera position and the new camera mode is within this cutoff distance, then the camera will cease to be in a transition and be in the new camera mode.
virtual void SetTransitionSpringCoefficient (float springCoef)=0
 This controls the springyness of the transition to a new camera mode when a new camera mode is selected.
virtual void SetTransitionTime (float time)=0
 Set the time to perform a transition.
virtual void SetUpSpringCoefficient (float springCoef)=0
 Sets the up vector spring coefficient that will be used for attached camera mode.

Detailed Description

This is a camera property class.

Definition at line 262 of file newcamera.h.


Member Function Documentation

virtual size_t iPcNewCamera::AttachCameraMode ( CEL_CAMERA_MODE  modetype  )  [pure virtual]

Attaches a built-in camera mode to this camera.

Parameters:
mode The id of the built-in camera mode to attach.
Returns:
A unique id for the attached camera mode.
virtual size_t iPcNewCamera::AttachCameraMode ( iCelCameraMode *  mode  )  [pure virtual]

Attaches a camera mode to this camera.

Parameters:
mode The camera mode to attach.
Returns:
A unique id for the attached camera mode.
virtual bool iPcNewCamera::DetectCollisions (  )  const [pure virtual]

Returns whether the camera will use collision detection to avoid moving through walls.

Returns:
True if collision detection is enabled.
virtual void iPcNewCamera::Draw (  )  [pure virtual]

Render.

This will clear the screen then draw on top of it.

Implements iPcCamera.

virtual const csVector3& iPcNewCamera::GetBaseDir (  )  const [pure virtual]

Gets the base direction of the camera.

Returns:
The base direction of the camera.
virtual const csVector3& iPcNewCamera::GetBaseOrigin (  )  const [pure virtual]

Gets the base origin of the camera in world coordinates.

Returns:
The base origin of the camera in world coordinates.
virtual const csVector3& iPcNewCamera::GetBasePos (  )  const [pure virtual]

Gets the base position of the camera in world coordinates.

Returns:
The base position of the camera in world coordinates.
virtual const csReversibleTransform& iPcNewCamera::GetBaseTrans (  )  const [pure virtual]

Gets the base transform of the camera.

Returns:
The base transform of the camera.
virtual const csVector3& iPcNewCamera::GetBaseUp (  )  const [pure virtual]

Gets the base up vector of the camera.

Returns:
The base up vector of the camera.
virtual iCelCameraMode* iPcNewCamera::GetCameraMode ( int  idx = -1  )  [pure virtual]

Gets the specified camera mode.

Parameters:
idx If -1 it will return the current mode
Returns:
The current camera mode.
virtual float iPcNewCamera::GetCollisionAvoidanceInterpolation (  )  const [pure virtual]

Get the collision avoidance movement interpolation value.

virtual float iPcNewCamera::GetCollisionAvoidanceRadiusSq (  )  const [pure virtual]

Get the player collision avoidance radius.

virtual float iPcNewCamera::GetCollisionCorrection (  )  const [pure virtual]

Get collision correction multiplier.

.. returns a float. is const / woo!

virtual bool iPcNewCamera::GetCollisionDetection (  )  const [pure virtual]

Returns whether the camera will use collision detection to avoid moving through walls.

Returns:
True if collision detection is enabled.
virtual float iPcNewCamera::GetCollisionSpringCoefficient (  )  const [pure virtual]

Returns the spring coefficient that is used when a collision is detection.

Returns:
The collision detection spring coefficient.
virtual float iPcNewCamera::GetCollisionYAvoidance (  )  const [pure virtual]

Get the Y offset avoidance value.

virtual float iPcNewCamera::GetCollisionYFocusOffset (  )  const [pure virtual]

Get the y focus offset used in collision detection.

virtual iCelCameraMode* iPcNewCamera::GetCurrentCameraMode (  )  [pure virtual]

Gets the current camera mode.

Returns:
The current camera mode.
virtual size_t iPcNewCamera::GetCurrentCameraModeIndex (  )  const [pure virtual]

Gets the index of the current camera mode.

Returns:
The index of the current camera mode.
virtual const csVector3& iPcNewCamera::GetOrigin (  )  const [pure virtual]

Gets the current origin of the camera.

Returns:
The current origin of the camera.
virtual float iPcNewCamera::GetOriginSpringCoefficient (  )  const [pure virtual]

Returns the origin spring coefficient that will be used for attached camera mode.

virtual const csVector3& iPcNewCamera::GetPos (  )  const [pure virtual]

Gets the current position of the camera.

Returns:
The current position of the camera.
virtual float iPcNewCamera::GetSpringCoefficient (  )  const [pure virtual]

Returns the common spring coefficient that will be used for attached camera mode.

virtual const csVector3& iPcNewCamera::GetTarget (  )  const [pure virtual]

Gets the current target of the camera.

Returns:
The current target of the camera.
virtual float iPcNewCamera::GetTargetSpringCoefficient (  )  const [pure virtual]

Returns the target spring coefficient that will be used for attached camera mode.

virtual const csOrthoTransform& iPcNewCamera::GetTransform (  )  [pure virtual]

Get the transform corresponding to this camera.

In this transform, 'other' is world space and 'this' is camera space.

virtual float iPcNewCamera::GetTransitionCutoffOriginDistance (  )  const [pure virtual]

Grabs the camera transition cutoff distance from origin to origin between the camera and the camera mode.

Returns:
The camera transition cutoff distance from target to target.
virtual float iPcNewCamera::GetTransitionCutoffPosDistance (  )  const [pure virtual]

Grabs the camera transition cutoff distance from position to position between the camera and the camera mode.

Returns:
The camera transition cutoff distance from target to target.
virtual float iPcNewCamera::GetTransitionCutoffTargetDistance (  )  const [pure virtual]

Grabs the camera transition cutoff distance from target to target between the camera and the camera mode.

Returns:
The camera transition cutoff distance from position to position.
virtual float iPcNewCamera::GetTransitionSpringCoefficient (  )  const [pure virtual]

This gets the springyness of the transition to a new camera mode when a new camera mode is selected.

Returns:
The spring coefficient of the camera transitions.
virtual float iPcNewCamera::GetTransitionTime (  )  const [pure virtual]

Get the time to transition to a new mode.

virtual const csVector3& iPcNewCamera::GetUp (  )  const [pure virtual]

Gets the current up vector of the camera.

Returns:
The current up vector of the camera.
virtual float iPcNewCamera::GetUpSpringCoefficient (  )  const [pure virtual]

Returns the up vector spring coefficient that will be used for attached camera mode.

virtual bool iPcNewCamera::InCameraTransition (  )  const [pure virtual]

Determines whether the camera is currently in a transition from one camera mode to another.

Returns:
True if the camera is currently in a transition.
virtual void iPcNewCamera::NextCameraMode (  )  [pure virtual]

Sets the current camera mode to the next available mode.

virtual void iPcNewCamera::PrevCameraMode (  )  [pure virtual]

Sets the current camera mode to the previous available mode.

template<typename T >
csPtr<T> iPcNewCamera::QueryModeInterface ( int  idx = -1  )  [inline]

Gets the camera mode's specialised interface.

If the specified mode does not implement that interface will return null.

Parameters:
T Template parameter for camera interface
idx If -1 it will return the current mode
Returns:
The current camera mode's interface.

Definition at line 649 of file newcamera.h.

virtual bool iPcNewCamera::Reset (  )  [pure virtual]

Reset the camera position.

virtual void iPcNewCamera::SetCameraPositionOffset ( const csVector3 offset  )  [pure virtual]

Sets the offset from the center of the mesh's iMovable to the position of the camera.

Parameters:
offset the offset from the center of the mesh to the camera position.
virtual void iPcNewCamera::SetCollisionAvoidanceInterpolation ( float  aint  )  [pure virtual]

Set the interpolation used in the collision avoidance.

Hard to describe how the value works but values close to 0 will give a fast jump, 1.0 is more realistic but higher is nicer and slower.

virtual void iPcNewCamera::SetCollisionAvoidanceRadiusSq ( float  radsq  )  [pure virtual]

Set the player collision avoidance radius.

Moves up over the player when camera gets too close.

Parameters:
radsq The squared radius value
virtual void iPcNewCamera::SetCollisionCorrection ( float  corr  )  [pure virtual]

multiplier for projected beam used in collision detection to place camera.

Values greater than 1.0f are desireable but project the camera position further away from it's true point the larger it is. A value of about 1.5f is usually good and is set as default anyway. 1.0f will give the true collision intersection of the camera, but you might end up seeing through walls ;)

virtual void iPcNewCamera::SetCollisionDetection ( bool  detectCollisions  )  [pure virtual]

Sets whether the camera will use collision detection to avoid moving through walls.

Parameters:
detectCollisions True if the camera should detect collisions.
virtual void iPcNewCamera::SetCollisionSpringCoefficient ( float  springCoef  )  [pure virtual]

Sets the spring coefficient that will be used when a collision is detected.

Parameters:
springCoef The new spring coefficient.
virtual void iPcNewCamera::SetCollisionYAvoidance ( float  yavoid  )  [pure virtual]

Set the y offset for camera to move upwards by for avoidance when it comes too close.

virtual void iPcNewCamera::SetCollisionYFocusOffset ( float  yoff  )  [pure virtual]

Set the y offset from player position for collision detection focus.

virtual bool iPcNewCamera::SetCurrentCameraMode ( size_t  modeIndex  )  [pure virtual]

Sets the current camera mode.

Parameters:
modeIndex The index of the current camera mode.
Returns:
True on successful camera mode change.
virtual void iPcNewCamera::SetOriginSpringCoefficient ( float  springCoef  )  [pure virtual]

Sets the origin spring coefficient that will be used for attached camera mode.

Parameters:
springCoef The new spring coefficient.
virtual void iPcNewCamera::SetPositionOffset ( const csVector3 offset  )  [pure virtual]

Sets the offset from the center of the mesh's iMovable (deprecated).

Parameters:
offset the offset from the center of the mesh
virtual void iPcNewCamera::SetSpringCoefficient ( float  springCoef  )  [pure virtual]

Sets the common spring coefficient that will be used for attached camera mode.

Parameters:
springCoef The new spring coefficient.
virtual void iPcNewCamera::SetTargetMinimumOffset ( float  minoff  )  [pure virtual]

Sets the minimum allowed offset up until the target.

virtual void iPcNewCamera::SetTargetPositionOffset ( const csVector3 offset  )  [pure virtual]

Sets the offset from the center of the mesh's iMovable to the position of the camera.

Parameters:
offset the offset from the center of the mesh to the camera position.
virtual void iPcNewCamera::SetTargetSpringCoefficient ( float  springCoef  )  [pure virtual]

Sets the target spring coefficient that will be used for attached camera mode.

Parameters:
springCoef The new spring coefficient.
virtual void iPcNewCamera::SetTransitionCutoffDistance ( float  cutOffOriginDist,
float  cutOffTargetDist 
) [pure virtual]

If the distance between the current camera position and the new camera mode is within this cutoff distance, then the camera will cease to be in a transition and be in the new camera mode.

Parameters:
cutOffOriginDist The camera transition mode cutoff distance from origin to origin.
cutOffTargetDist The camera transition mode cutoff distance from target to target.
virtual void iPcNewCamera::SetTransitionSpringCoefficient ( float  springCoef  )  [pure virtual]

This controls the springyness of the transition to a new camera mode when a new camera mode is selected.

Parameters:
springCoef The new spring coefficient of camera transitions.
virtual void iPcNewCamera::SetTransitionTime ( float  time  )  [pure virtual]

Set the time to perform a transition.

Parameters:
time Time to transition to the new mode.
virtual void iPcNewCamera::SetUpSpringCoefficient ( float  springCoef  )  [pure virtual]

Sets the up vector spring coefficient that will be used for attached camera mode.

Parameters:
springCoef The new spring coefficient.

The documentation for this struct was generated from the following file:

Generated for CEL: Crystal Entity Layer 2.1 by doxygen 1.6.1