Roboid Control for C# 0.4
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Properties | List of all members
RoboidControl.Unity.Motor Class Reference

Detailed Description

The Unity representation of a Roboid Control motor.

Inheritance diagram for RoboidControl.Unity.Motor:
RoboidControl.Unity.Thing

Public Member Functions

void UpdateThing ()
 Update the Unity state.
 

Static Public Member Functions

static Motor Create (RoboidControl.Motor coreMotor)
 Create the Unity representation of the motor.
 
static Thing Create (RoboidControl.Thing core)
 Create a Unity representation of a Thing.
 

Public Attributes

float maxSpeed = 5
 The maximum rotation speed of the motor in rotations per second.
 
Participant owner
 The owner of this thing.
 

Protected Member Functions

override void FixedUpdate ()
 Update the Unity state.
 
override void HandleBinary ()
 Handle the binary event containing the rotation speed.
 
void Init (RoboidControl.Thing core)
 Initialize the Thing.
 
virtual void Update ()
 Update the Unity rendering.
 
virtual void HandlePose ()
 Handle a Pose event.
 

Properties

RoboidControl.Motor coreMotor [get]
 The core motor.
 
float rotationSpeed [get, protected set]
 The actual rotation speed in rotations per second.
 
RoboidControl.Thing core [get, set]
 The core C# thing.
 

Member Function Documentation

◆ Create() [1/2]

static Motor RoboidControl.Unity.Motor.Create ( RoboidControl::Motor  coreMotor)
static

Create the Unity representation of the motor.

Parameters
coreMotorThe core motor
Returns
The Unity representation of a motor

This uses a 'Motor' resource when available for the Unity representation. If this is not available, a default representation is created.

◆ FixedUpdate()

override void RoboidControl.Unity.Motor.FixedUpdate ( )
protectedvirtual

Update the Unity state.

Reimplemented from RoboidControl.Unity.Thing.

◆ HandleBinary()

override void RoboidControl.Unity.Motor.HandleBinary ( )
protectedvirtual

Handle the binary event containing the rotation speed.

Reimplemented from RoboidControl.Unity.Thing.

◆ Create() [2/2]

static Thing RoboidControl.Unity.Thing.Create ( RoboidControl::Thing  core)
staticinherited

Create a Unity representation of a Thing.

Parameters
coreThe core of the thing
Returns
The created thing

◆ Init()

void RoboidControl.Unity.Thing.Init ( RoboidControl::Thing  core)
protectedinherited

Initialize the Thing.

Parameters
coreThe core of the thing

This affects the parent and pose of the thing

◆ HandlePose()

virtual void RoboidControl.Unity.Thing.HandlePose ( )
protectedvirtualinherited

Handle a Pose event.

This can update the position and/or orientation when the velocity of the thing is zero. If a velocity is not zero, the position and/or orientation update will be ignored