// -*- mode: idl; indent-tabs-mode: t; tab-width: 4; c-basic-offset: 4; -*- #ifndef OPENHRP_COMMON_IDL_INCLUDED #define OPENHRP_COMMON_IDL_INCLUDED /** * @if jp * OpenHRP 基本データ構造 * @else * OpenHRP CORBA Common * @endif * @file idl/OpenHRP/OpenHRPCommon.idl */ module OpenHRP { typedef sequence FloatSequence; typedef sequence ShortSequence; typedef sequence OctetSequence; typedef double DblArray4[4]; typedef float FloatArray3[3]; typedef sequence DblSequence; typedef sequence StringSequence; typedef sequence LongSequence; typedef double DblArray3[3]; typedef double DblArray6[6]; typedef double DblArray9[9]; typedef double DblArray12[12]; typedef sequence DblSequence3; typedef sequence DblSequence6; typedef sequence DblSequence9; typedef sequence DblArray3Sequence; typedef sequence DblArray6Sequence; typedef sequence DblArray12Sequence; typedef sequence DblSequenceSequence; /** * @if jp * リンク位置/姿勢 * @endif */ struct LinkPosition { /** * @if jp * 位置ベクトル * @endif */ DblArray3 p; /** * @if jp * 姿勢行列 * @else * Row major array of 3x3 Matrix elements * @endif */ DblArray9 R; }; typedef sequence LinkPositionSequence; /** * @if jp * キャラクタの位置/姿勢 * @endif */ struct CharacterPosition { /** * @if jp * キャラクタ名 * @endif */ string characterName; /** * @if jp * キャラクタを構成するリンクの位置/姿勢 * @endif */ LinkPositionSequence linkPositions; }; typedef sequence CharacterPositionSequence; /** * @if jp * リンクのペア * @endif */ struct LinkPair { /** * @if jp * 1組目のキャラクタ名 * @else * Character Name to Identify Polygon Set * @endif */ string charName1; /** * @if jp * 1組目のリンク名 * @else * Link Name to Identify Polygon Set * @endif */ string linkName1; /** * @if jp * 2組目のキャラクタ名 * @else * Character Name to Identify Polygon Set * @endif */ string charName2; /** * @if jp * 2組目のリンク名 * @else * Link Name to Identify Polygon Set * @endif */ string linkName2; /** * @if jp * リンク間の距離がこの値よりも小さい場合,干渉と見なす * @else * When distance between links is smaller than this value, it is regarded as collision * @endif */ double tolerance; }; typedef sequence LinkPairSequence; /** * @if jp * 衝突している点 * @endif */ struct CollisionPoint { /** * @if jp * 衝突点 * @endif */ DblArray3 position; /** * @if jp * 法線ベクトル * @endif */ DblArray3 normal; /** * @if jp * 干渉の深さ * @endif */ double idepth; }; typedef sequence CollisionPointSequence; /** * @if jp * 衝突情報 * @endif */ struct Collision { /** * @if jp * 衝突しているペア * @endif */ LinkPair pair; /** * @if jp * 衝突している点 * @endif */ CollisionPointSequence points; }; typedef sequence CollisionSequence; /** * @if jp * 距離,最近点情報 * @endif */ struct Distance { /** * @if jp * ペア * @endif */ LinkPair pair; /** * @if jp * 距離 * @endif */ double minD; /** * @if jp * 最近点 * @endif */ DblArray3 point0; DblArray3 point1; }; typedef sequence DistanceSequence; /** * @if jp * シミュレーションの情報 * @endif */ struct WorldState { /** * @if jp * 現在の経過時間[s] * @endif */ double time; /** * @if jp * シミュレーションするキャラクタの位置/姿勢 * @endif */ CharacterPositionSequence characterPositions; /** * @if jp * 衝突情報 * @endif */ CollisionSequence collisions; }; /** * @if jp * サーバ * @endif */ interface ServerObject { /** * @if jp * 終了 * @endif */ oneway void shutdown(); }; /** * @if jp * Extra Joint の型 * @endif */ enum ExtraJointType { EJ_XYZ, EJ_XY, EJ_Z }; }; #endif