Interhaptics SDK for Unity 1.6
Loading...
Searching...
No Matches
Interhaptics.HapticBodyPart Class Reference
Inheritance diagram for Interhaptics.HapticBodyPart:

Public Member Functions

List< CommandDataToCommandData ()
 
void DebugMode (string debugMessage)
 
void UpdateTargetIntensity (double targetIntensityValue)
 

Public Attributes

GroupID BodyPart = GroupID.Hand
 
LateralFlag Side = LateralFlag.Global
 
bool debugMode = false
 

Properties

int HapticMaterialId [get, set]
 
double TargetIntensity [get, set]
 

Detailed Description

Definition at line 14 of file HapticBodyPart.cs.

Member Function Documentation

◆ DebugMode()

void Interhaptics.HapticBodyPart.DebugMode ( string debugMessage)

Definition at line 40 of file HapticBodyPart.cs.

41 {
42 if (debugMode)
43 {
44 Debug.Log(debugMessage);
45 }
46 }

References Interhaptics.HapticBodyPart.debugMode.

Referenced by Interhaptics.HapticBodyPart.UpdateTargetIntensity().

◆ ToCommandData()

List< CommandData > Interhaptics.HapticBodyPart.ToCommandData ( )

Definition at line 20 of file HapticBodyPart.cs.

21 {
22 return new List<CommandData> { new CommandData(Operator.Plus, this.BodyPart, this.Side) };
23 }
Operator
Enumeration for operator signs in haptic command data.
Structure for command data in haptic systems.

Referenced by Interhaptics.HapticBodyPart.UpdateTargetIntensity().

◆ UpdateTargetIntensity()

void Interhaptics.HapticBodyPart.UpdateTargetIntensity ( double targetIntensityValue)

Definition at line 47 of file HapticBodyPart.cs.

48 {
49 targetIntensity = targetIntensityValue;
50 // Create the CommandData array for this HapticBodyPart
51 CommandData[] commandDataArray = ToCommandData().ToArray();
52 // Update the target intensity for this HapticBodyPart
53 HAR.SetTargetIntensityMarshal(HapticMaterialId, commandDataArray, commandDataArray.Length, targetIntensity);
54 DebugMode("UpdateTargetIntensity: " + targetIntensity);
55 }
void DebugMode(string debugMessage)
List< CommandData > ToCommandData()

References Interhaptics.HapticBodyPart.DebugMode(), Interhaptics.HapticBodyPart.HapticMaterialId, and Interhaptics.HapticBodyPart.ToCommandData().

Member Data Documentation

◆ BodyPart

GroupID Interhaptics.HapticBodyPart.BodyPart = GroupID.Hand

Definition at line 17 of file HapticBodyPart.cs.

◆ debugMode

bool Interhaptics.HapticBodyPart.debugMode = false

Definition at line 25 of file HapticBodyPart.cs.

Referenced by Interhaptics.HapticBodyPart.DebugMode().

◆ Side

LateralFlag Interhaptics.HapticBodyPart.Side = LateralFlag.Global

Definition at line 18 of file HapticBodyPart.cs.

Property Documentation

◆ HapticMaterialId

int Interhaptics.HapticBodyPart.HapticMaterialId
getset

Definition at line 26 of file HapticBodyPart.cs.

26{ get; set; }

Referenced by Interhaptics.HapticBodyPart.UpdateTargetIntensity().

◆ TargetIntensity

double Interhaptics.HapticBodyPart.TargetIntensity
getset

Definition at line 31 of file HapticBodyPart.cs.

32 {
33 get => targetIntensity;
34 set
35 {
36 targetIntensity = value;
37 }
38 }

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