Skip to content

raisin::tcp_viewer::ClientRequest ​

struct · #include <rayrai/TcpProtocolMessages.hpp>

A single pending client request to be flushed on the next update.

Filled by the viewer UI (play/pause/step, force handles, pose authoring, the spawn palette, the interaction wire) and drained into the binary wire format by sendUpdateRequest(). Only the fields relevant to type are encoded.

Public attributes ​

type ​

cpp
ClientRequestType type

Request kind; selects the encoded fields.

stepCount ​

cpp
int32_t stepCount

Steps to advance (CR_STEP_N).

visTag ​

cpp
uint32_t visTag

Target object visual tag.

localBodyIdx ​

cpp
int32_t localBodyIdx

Target body index within the object.

vec3a ​

cpp
glm::vec3 vec3a

force application point / pose or spawn position / torque

vec3b ​

cpp
glm::vec3 vec3b

force command; RaisimServer multiplies it by target body mass

quat ​

cpp
glm::vec4 quat

pose/spawn orientation, wxyz: x holds w

gc ​

cpp
std::vector<float> gc

Generalized coordinates (CR_SET_GC).

name ​

cpp
std::string name

Name of the spawned object.

appearance ​

cpp
std::string appearance

Appearance string of the spawned object.

file ​

cpp
std::string file

Server-side path: RaisimServer resolves it on the simulation host, not here.

mass ​

cpp
float mass

Mass of the spawned body.

bodyType ​

cpp
int32_t bodyType

SpawnBodyType value.

size ​

cpp
std::array<float, kClientRequestSizeSlots> size

Shape extents; all slots are always sent.

linVel ​

cpp
glm::vec3 linVel

Initial linear velocity of a spawned body.

angVel ​

cpp
glm::vec3 angVel

Initial angular velocity of a spawned body.

stiffness ​

cpp
float stiffness

Spring constant per unit mass. Zeroed by the server on any frame that omits CR_DRAG_OBJECT, so a live drag has to resend it every update.

point ​

cpp
glm::dvec3 point

Wire attach/target point. Encoded as three native doubles (legacy format).

manifestId ​

cpp
uint64_t manifestId

Manifest the request refers to (CR_SCENE_*).

fileIndex ​

cpp
int32_t fileIndex

File index in the manifest (CR_SCENE_FILE_CHUNK).

fileOffset ​

cpp
uint64_t fileOffset

First byte requested (CR_SCENE_FILE_CHUNK).

maxBytes ​

cpp
int32_t maxBytes

Most bytes requested (CR_SCENE_FILE_CHUNK).

RaiSim — physics for robotics and AI.