Interface used to implement vehicle views
struct IVehicleView : public IVehicleObject { };
IVehicleSystem.h
A vehicle view is a camera implementation. Default implementations of a first person and third person camera are already available in the CryAction Dll.
Returns the id of the vehicle object
virtual TVehicleObjectId GetId() = 0;
virtual void GetMemoryUsage(ICrySizer * pSizer) const = 0;
Returns the name of the camera view
virtual const char* GetName() = 0;
virtual bool Init(IVehicleSeat* pSeat, const CVehicleParams& table) = 0;
virtual bool IsAvailableRemotely() const = 0;
virtual bool IsDebugView() = 0;
Indicates if the player body has been hidden
virtual bool IsPassengerHidden() = 0;
Indicates if the view implements a third person camera
virtual bool IsThirdPerson() = 0;
virtual void OffsetPosition(const Vec3 & delta) = 0;
virtual void OnAction(const TVehicleActionId actionId, int activationMode, float value) = 0;
Performs tasks needed when the client start using this view
virtual void OnStartUsing(EntityId playerId) = 0;
Parameters |
Description |
EntityId playerId |
EntityId of the player who will use the view |
Performs tasks needed when the client stop using this view
virtual void OnStopUsing() = 0;
virtual void Release() = 0;
virtual void Reset() = 0;
virtual void ResetPosition() = 0;
Serialize the vehicle object
virtual void Serialize(TSerialize ser, EEntityAspects aspects) = 0;
virtual void SetDebugView(bool debug) = 0;
virtual bool ShootToCrosshair() = 0;
Performs computation which depends of the frame rate
virtual void Update(const float deltaTime) = 0;
virtual void UpdateView(SViewParams & viewParams, EntityId playerId = 0) = 0;