Skip to content

Commit

Permalink
Documentation|Smoother|Input: Added some missing apidocs
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed May 4, 2012
1 parent 849dcce commit 746f2e5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 13 deletions.
12 changes: 12 additions & 0 deletions doomsday/engine/api/smoother.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,18 @@ void Smoother_AddPosXY(Smoother* sm, float time, coord_t x, coord_t y);
*/
boolean Smoother_Evaluate(const Smoother* sm, coord_t* xyz);

/**
* Calculates a coordinate for the current point in time.
*
* @param sm Smoother instance.
* @param component The component to evaluate (0..2).
* @param v The evaluated coordinate value is written here. Must have room for 1 value.
*
* @return @c true if the evaluation was successful. When @c false is returned,
* the value in @a v is not valid.
*
* @see Smoother_Advance()
*/
boolean Smoother_EvaluateComponent(const Smoother* sm, int component, coord_t* v);

/**
Expand Down
24 changes: 11 additions & 13 deletions doomsday/engine/portable/include/dd_input.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,20 +149,18 @@ enum
#define IDA_INVERT 0x2 // Real input data should be inverted.

typedef struct inputdevaxis_s {
char name[20]; // Symbolic name of the axis.
int type; // Type of the axis (pointer or stick).
char name[20]; ///< Symbolic name of the axis.
int type; ///< Type of the axis (pointer or stick).
int flags;
coord_t position; // Current translated position of the axis (-1..1) including any filtering.
coord_t realPosition; // The actual position of the axis (-1..1).
float scale; // Scaling factor for real input values.
float deadZone; // Dead zone, in (0..1) range.
//int filter; // Filter grade.
//float accumulation; // Position accumulator for the filter.
coord_t sharpPosition;
Smoother* smoother; // Smoother for the input values.
coord_t prevSmoothPos;
uint time; // Timestamp for the latest update that changed the position.
inputdevassoc_t assoc; // Binding association.
coord_t position; ///< Current translated position of the axis (-1..1) including any filtering.
coord_t realPosition; ///< The actual latest position of the axis (-1..1).
float scale; ///< Scaling factor for real input values.
float deadZone; ///< Dead zone, in (0..1) range.
coord_t sharpPosition; ///< Current sharp (accumulated) position, entered into the Smoother.
Smoother* smoother; ///< Smoother for the input values.
coord_t prevSmoothPos; ///< Previous evaluated smooth position (needed for producing deltas).
uint time; ///< Timestamp for the latest update that changed the position.
inputdevassoc_t assoc; ///< Binding association.
} inputdevaxis_t;

typedef struct inputdevkey_s {
Expand Down

0 comments on commit 746f2e5

Please sign in to comment.