Annwvyn::AnnHandControllerAxis Class Reference

Represent the axis of an hand controller. More...

#include <AnnHandController.hpp>

Collaboration diagram for Annwvyn::AnnHandControllerAxis:

Public Member Functions

 AnnHandControllerAxis (const std::string &AxisName, float normalizedValue)
 Create an AnnHandControllerAxis object. More...
 
 AnnHandControllerAxis (const AnnHandControllerAxis &axis)=default
 Default copy constructor. We are just a float and a string. More...
 
std::string getName () const
 Name of the axis. More...
 
float getValue () const
 Analog value between -1 and 1. Some trigger inputs are from 0 to 1 only. More...
 

Private Member Functions

void updateValue (float normalizedValue)
 Change the value of the string. More...
 

Static Private Member Functions

static bool isInRange (float v)
 Return true if the value v is acceptable. More...
 

Private Attributes

std::string name
 Name of the axis. More...
 
float value
 Value of the axis. More...
 

Friends

class AnnOgreVRRenderer
 
class AnnOgreOpenVRRenderer
 
class AnnOgreOculusRenderer
 

Detailed Description

Represent the axis of an hand controller.

Definition at line 22 of file AnnHandController.hpp.

Constructor & Destructor Documentation

◆ AnnHandControllerAxis() [1/2]

AnnHandControllerAxis::AnnHandControllerAxis ( const std::string AxisName,
float  normalizedValue 
)

Create an AnnHandControllerAxis object.

Parameters
AxisNameName of the axis
normalizedValueinitial value

Definition at line 204 of file AnnHandController.cpp.

Here is the call graph for this function:

◆ AnnHandControllerAxis() [2/2]

Annwvyn::AnnHandControllerAxis::AnnHandControllerAxis ( const AnnHandControllerAxis axis)
default

Default copy constructor. We are just a float and a string.

Member Function Documentation

◆ getName()

std::string AnnHandControllerAxis::getName ( ) const

Name of the axis.

Definition at line 211 of file AnnHandController.cpp.

◆ getValue()

float AnnHandControllerAxis::getValue ( ) const

Analog value between -1 and 1. Some trigger inputs are from 0 to 1 only.

Definition at line 212 of file AnnHandController.cpp.

◆ isInRange()

bool AnnHandControllerAxis::isInRange ( float  v)
staticprivate

Return true if the value v is acceptable.

Definition at line 220 of file AnnHandController.cpp.

Here is the caller graph for this function:

◆ updateValue()

void AnnHandControllerAxis::updateValue ( float  normalizedValue)
private

Change the value of the string.

Definition at line 214 of file AnnHandController.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ AnnOgreOculusRenderer

friend class AnnOgreOculusRenderer
friend

Definition at line 42 of file AnnHandController.hpp.

◆ AnnOgreOpenVRRenderer

friend class AnnOgreOpenVRRenderer
friend

Definition at line 41 of file AnnHandController.hpp.

◆ AnnOgreVRRenderer

friend class AnnOgreVRRenderer
friend

Definition at line 40 of file AnnHandController.hpp.

Member Data Documentation

◆ name

std::string Annwvyn::AnnHandControllerAxis::name
private

Name of the axis.

Definition at line 51 of file AnnHandController.hpp.

◆ value

float Annwvyn::AnnHandControllerAxis::value
private

Value of the axis.

Definition at line 54 of file AnnHandController.hpp.


The documentation for this class was generated from the following files: